Created
October 30, 2025 11:08
-
-
Save fatso83/c8bb58b9acddd2500faace2d43cf6169 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Strange: | |
| foo = 10 | |
| def inc(self): | |
| self.foo += 1 | |
| a = Strange() | |
| b = Strange() | |
| a.inc() | |
| a.inc() | |
| a.inc() | |
| a.inc() | |
| a.inc() | |
| print('a',a.foo) | |
| print('b',b.foo) | |
| Strange.foo = 22 | |
| print('a', a.foo) | |
| print('b', b.foo) | |
| b.inc() | |
| b.inc() | |
| c = Strange() | |
| print('a', a.foo) | |
| print('b', b.foo) | |
| print('c', c.foo) | |
Author
fatso83
commented
Oct 30, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment