Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = object()
- a.z = 10 # AttributeError: 'object' object has no attribute 'z'
- class pepega(object):
- def __init__(self):
- super().__init__()
- p = pepega()
- p.z = 10 # No error
- print(p.z) # -> 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement