Every time I see “z3” I think of Konrad Zuse’s machine.
The “how this works” part is hilarious. I love wacky stuff like this.
It’s also very familiar. I used a lot of nearly identical tricks for CrossHair. My latest discovery: you can install a per-opcode tracer with sys.settrace() and then use ctypes to reach into the interpreter’s stack and hot-swap objects before the opcode executes.