diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2005-10-23 21:52:59 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2005-10-23 21:52:59 (GMT) |
commit | db85ed548a04585dc0ea77fdf8b60ad600909451 (patch) | |
tree | db12e5767d342dbea42b973ce78a18c3cf3348d2 /Doc/whatsnew | |
parent | 4fe4eb221b1f2fc25a7f8b6a43c6d84bdaae7fac (diff) | |
download | cpython-db85ed548a04585dc0ea77fdf8b60ad600909451.zip cpython-db85ed548a04585dc0ea77fdf8b60ad600909451.tar.gz cpython-db85ed548a04585dc0ea77fdf8b60ad600909451.tar.bz2 |
Add paragraphs on AST branch. AST'ers, please suggest corrections
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/whatsnew25.tex | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex index dac87b4..77e4781 100644 --- a/Doc/whatsnew/whatsnew25.tex +++ b/Doc/whatsnew/whatsnew25.tex @@ -447,6 +447,31 @@ Changes to Python's build process and to the C API include: \begin{itemize} +\item The design of the bytecode compiler has changed a great deal, no +longer generating bytecode by traversing the parse tree. Instead +the parse tree is converted to an abstract syntax tree (or AST), and it is +the abstract syntax tree that's traversed to produce the bytecode. + +No documentation has been written for the AST code yet. To start +learning about it, read the definition of the various AST nodes in +\file{Parser/Python.asdl}. A Python script reads this file and +generates a set of C structure definitions in +\file{Include/Python-ast.h}. The \cfunction{PyParser_ASTFromString()} +and \cfunction{PyParser_ASTFromFile()}, defined in +\file{Include/pythonrun.h}, take Python source as input and return the +root of an AST representing the contents. This AST can then be turned +into a code object by \cfunction{PyAST_Compile()}. For more +information, read the source code, and then ask questions on +python-dev. + +% List of names taken from Jeremy's python-dev post at +% http://mail.python.org/pipermail/python-dev/2005-October/057500.html +The AST code was developed under Jeremy Hylton's management, and +implemented by (in alphabetical order) Brett Cannon, Nick Coghlan, +Grant Edwards, John Ehresman, Kurt Kaiser, Neal Norwitz, Tim Peters, +Armin Rigo, and Neil Schemenauer, plus the participants in a number of +AST sprints at conferences such as PyCon. + \item The built-in set types now have an official C API. Call \cfunction{PySet_New()} and \cfunction{PyFrozenSet_New()} to create a new set, \cfunction{PySet_Add()} and \cfunction{PySet_Discard()} to |