Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
db85ed54
Commit
db85ed54
authored
Oct 23, 2005
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add paragraphs on AST branch. AST'ers, please suggest corrections
parent
4fe4eb22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
Doc/whatsnew/whatsnew25.tex
Doc/whatsnew/whatsnew25.tex
+25
-0
No files found.
Doc/whatsnew/whatsnew25.tex
View file @
db85ed54
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment