2 ms·
As a serious Java nerd now programming python, I'd love to see something like this for python!
by javajosh 8y ago
As a serious Java nerd now programming python, I'd love to see something like this for python!
- hyperpape 8y agoI think pgbovine has done some things, but I don’t have a link. I also read a lot of shorter Python internals posts when I was learning Python. Maybe look at Raymond Hettinger?
- simen 8y agoYou could begin with 500 lines or less: http://www.aosabook.org/en/500L/a-python-interpreter-written-in-python.html http://www.aosabook.org/en/500L/a-python-interpreter-written... It implements a naive, simplified Python VM in Python. Of course, that is only a very high-level overview. By necessity it handwaves a ton by just relying on the underlying Python (like GC). For a more in-depth look, you can check out PyPy's dev docs (http://doc.pypy.org/en/latest/ http://doc.pypy.org/en/latest/). PyPy is an alternative to CPython, so it does many things very differently (some in a way that have never been done in prog lang implementation before), but the docs do make comparisons to CPython.