I read that self is not a keyword in python, but why the following code outputs: (10, 10)???
One of my function use selff
and other one use self
.
I use python 2.7.
class Point:
def __init__(selff, x=0, y=0):
selff.x = x
selff.y = y
def __str__(self):
return "({0}, {1})".format(self.x, self.y)
p1 = Point(10,10)
print p1