Memphis
Memphis is a ridiculous Python interpreter written from scratch in Rust. It’s both a personal learning tool and a long-term technical experiment. It supports multiple execution modes, including a mostly working treewalk interpreter and an in-progress bytecode virtual machine.
It can run some code but probably not your code. If you're curious about how interpreters and compilers actually work, I hope this project offers a useful (and occasionally silly) resource.
How Python works under the hood
One of the goals of Memphis is to make Python’s hidden mechanisms visible. If you’re curious about how Python works under the hood, you can start with one of these.
2026-07-08
What `for x in y` hides from you
What a Python `for` loop is really doing once you look under the hood.
2025-06-16
How global variables work in Python bytecode
Why globals are weirder than locals in Python bytecode, and why the VM has to work harder to find them.
2025-06-02
How local variables work in Python bytecode
What people mean when they say local variables live on the stack, and how that actually plays out in a Python bytecode VM.