An executable operational semantics for Python

Piet van Oostrum piet at
Mon Apr 6 20:14:01 CEST 2009

>>>>> bearophileHUGS at (b) wrote:

>b> gideon:
>>> I've recently finished my Master's thesis on the semantics of Python.
>>> In my thesis I define the semantics of Python by rewriting an abstract
>>> machine. The sources that are used to produce my thesis can also be
>>> compiled into a working interpreter. Hence I call it an 'executable'
>>> semantics.

>b> Can it be used for some useful purpose?

I wanted to play with Python's MRO algorithm in the last weeks. I just
took the MRO description from Gideon's thesis, put it in a small Haskell
program and now I can easily try it out. 
Piet van Oostrum <piet at>
URL: [PGP 8DAE142BE17999C4]
Private email: piet at

More information about the Python-list mailing list