Created
February 23, 2023 09:15
-
-
Save qexat/ef763299e5e832a4271b06f980dfbc43 to your computer and use it in GitHub Desktop.
Ah yes Python's arrow operator
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 hackint(int): | |
| def __neg__(self): | |
| for key, value in globals().items(): | |
| if self is value: | |
| globals()[key] = type(self)(self - 1) | |
| return self | |
| x = hackint(5) | |
| while 0 <-- x: | |
| print(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment