Last active
August 29, 2015 14:02
-
-
Save aliafshar/f014055896e02a197ab0 to your computer and use it in GitHub Desktop.
where is your god now?
This file contains 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
>>> import ctypes | |
>>> ctypes.c_int.from_address(id(True) + 16).value = 0 | |
>>> True | |
False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For those who care: This relies on the Python implementation using an object memory address as the object unique ID, so it will work in CPython but may not port to other implementations.