Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class a:
- var = False
- def change(self):
- __class__.var = True
- >> c = a() # My attempt to replicate class a separately into a variable named c
- >> c.var
- False
- >> a().change()
- >> c.var
- True
- >>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement