How is Python designed?

Limin Fu fulimin_yuan at yahoo.com
Fri Dec 3 22:31:08 CET 2004


Thanks a lot for the explanations.
So CPython used more or less the standard technique to
implement the interpreter. 

Are there any other interpretation techniques? I guess
many. But I'm quite new in this field and I couldn't
find good references on internet about this. If there
is anybody has such references, please send me some if
you don't mind. I would be appreciative very much.
Best,

Limin


--- Terry Reedy <tjreedy at udel.edu> wrote:

> 
> "Limin Fu" <fulimin_yuan at yahoo.com> wrote in message
> 
>
news:20041203094617.9778.qmail at web80907.mail.scd.yahoo.com...
> > To clarify, I mean the internal structure and
> design
> > of python interpreter. Any hint? Thanks.
> 
> Ah... The interpreters (plural) are a separate issue
> from the language 
> itself (a Python program is a list of Python
> statements, etc).  We'll 
> presume that you specifically mean the CPython
> interpreter, as opposed to 
> Jython, Viper, Ironman, PyPy, Parrot, or the human
> brain.  For CPython:
> 
> human or other source code generator ==> Python
> source code
> 
> CPython compile phase:
> lexer ==> tokens
> parser ==> ast tree
> byte code generator ==> byte codes for Python
> virtual machine
>   (see the Lib Ref chapter on the dis module for VM
> commands)
> 
> CPython runtime phase:
> code evaluator  ==> computations
>    (see source file ceval.c for the link between
> byte codes and C 
> functions)
> 
> CPython is currently both the reference
> implementation and the most 
> commonly used implementation.  Both facts could
> change in the future, 
> possibly even with divergence between the two roles.
>  Since Python is meant 
> to be a practical computer language as well as an
> abstract algorithm 
> language (for humans), a reference implementation is
> needed to show that 
> proposed language features can be sensibly
> implemented.
> 
> Terry J. Reedy
> 
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 



		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 




More information about the Python-list mailing list