Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A:
- def __init__(self):
- x = 0
- def test(self):
- self.y = 0
- instance = A()
- instance.test()
- print instance.y #throws error 'no attribute'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement