class Test(object):
def __init__(self, x, y):
self.x, self.y = x, y
def __str__(self):
return "x = {} y = {}".format(self.x, self.y)
o = Test(13, 200)
print(o.__str__)
print(o)
'''
run:
<bound method Test.__str__ of <__main__.Test object at 0x00445A70>>
x = 13 y = 200
'''