Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class c:
- def __init__(self):
- # don't create any attributes of 'self', that will cause an error if tried to evaluate that variable
- self = self() # the weirdest part
- # this function doesn't need 'self', because of 'self = self()' (idk why). It can be accessed by 'c.test()'
- def test():
- print ('test')
- # this variable can be accessed by 'c.spam'
- spam = 'eggs'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement