Created
January 20, 2025 14:52
-
-
Save DavidBuchanan314/6135e77ead1c8730fb535da54bb19435 to your computer and use it in GitHub Desktop.
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 unsafe # https://github.com/DavidBuchanan314/unsafe-python | |
mem = unsafe.getmem() | |
def very_equal(a: int, b: int) -> None: | |
addr = id(a) | |
mem[addr+24:addr+32] = b.to_bytes(8, "little") | |
very_equal(2 + 2, 5) | |
print(2 + 2 == 5) # True | |
print(2 + 2) # 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment