Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo
- def __init__(self,number):
- self.__index = number
- def index(self):
- int(self.__index)
- def view(self):
- print self.__index # "1"
- print self.index # should be 1, but is a bound method
- x = Foo("1")
- x.view()
Add Comment
Please, Sign In to add comment