Apr-22-2017, 04:18 PM
Maybe it would help if I give you the entire __repr__ function. The data being passed as parameters is mass = 3, position = (0,6.37e+06,0), and velocity = (0,0,0)
def __repr__(self): #Representation Call #"3kg (0,6.37e+06,0) (0,0,0)" formatted = '{1:.6f},({1:.6f},{1:.6f},{1:.6f}),({1:.6f},{1:.6f},{1:.6f})'.format(self.mass, self.position, self.velocity) print(formatted) #This was for testing. return formatted