By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,686 Members | 1,603 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,686 IT Pros & Developers. It's quick & easy.

How is Python designed?

P: n/a
Hello,
Is there any technical description on internet of how
python is designed? Or can somebody give a short
description about this? I'm just curious.
Thanks in advance,
Limin


__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Limin Fu wrote:
Hello,
Is there any technical description on internet of how
python is designed? Or can somebody give a short
description about this? I'm just curious.


Do you mean the structure and design of the language, or the process of
designing the language?

Well, in either case, you'll probably find your answer at http://www.python.org

Take a look at the Docs -> Language Reference and PEP sections.

--
Timo Virkkala
Jul 18 '05 #2

P: n/a

"Limin Fu" <fu**********@yahoo.com> wrote in message
news:20***********************@web80907.mail.scd.y ahoo.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

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.