aosabook/500lines — pull request #43 by akaptur (2014-03-03 23:04:15+00:00)
Title: The Python interpreter

The Python interpreter draft.

A couple of questions:
- is there a squashing convention on this project? My usual style is tiny commits, which is what's represented here, but I'm happy to squash.
- I'm at 625 lines total for the relevant files, of which 111 are empty (and then there are comments). Is that close enough to 500? If not, the project is fairly modular - I can just drop support for more opcodes - so I'm happy to pare it down further.

Other comments:
- I've checked in tests, although they're not part of the 500 lines / not for inclusion in the book. (They're not that interesting anyway - just verifying that little snippets of Python do the right thing.)
- This isn't quite ready for code review - I'm going to give it another read tomorrow and submit a final first draft then.
- I ended up dropping support for classes, which I think would have overlapped with the object model chapter anyway.
- It was less work than I thought it would be to adapt this from @nedbat's byterun, so we should make sure he gets appropriate credit.