If you are using python2.x, then when you think you are calling print as a function, you are really printing a tuple using the print keyword ...
print(1,2,3)
print (1,2,3)
In python3 you should do this as a function call print(1,2,3).
, , python2.x, , , . tuple tuple , . : print "Point",p1, .
print str(p1)
print repr(p1)
, , __repr__ __str__:
class Point():
def __init__(self,x,y):
self.x = x
self.y = y
def __repr__(self):
return "Point x: {0}, Point y: {1}".format(self.x, self.y)