class Point:
def __init__(self, initX, initY):
self.x = initX
self.y = initY
def __str__(self):
print "in __str__"
return str(self.x, ",", self.y)
p = Point(1,2)
print p
print str(p)
Should print (1, 2) but instead prints <__main__.Point object>
Message in __str__ is not displayed either.
Original issue reported on code.google.com by bonelake on 9 Jul 2011 at 5:34
Original issue reported on code.google.com by
bonelake
on 9 Jul 2011 at 5:34