mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
![]() Add support for floor division (// and //=) The implementation of getChildren() and getChildNodes() is intended to be faster, because it avoids calling flatten() on every return value. But it's not clear that it is a lot faster, because constructing a tuple with just the right values ends up being slow. (Too many attribute lookups probably.) The ast.txt file is much more complicated, with funny characters at the ends of names (*, &, !) to indicate the types of each child node. The astgen script is also much more complex, making me wonder if it's still useful. |
||
---|---|---|
.. | ||
compiler | ||
doc | ||
ACKS | ||
ast.txt | ||
astgen.py | ||
compile.py | ||
demo.py | ||
dumppyc.py | ||
README | ||
regrtest.py | ||
setup.py |
This directory contains modules for a a Python source to bytecode compiler written in pure Python. To install the compiler modules so they're available for use by third-party Python software, run 'python setup.py install'. compile.py Demo that compiles a Python module into a .pyc file using the pure-Python compiler code. demo.py Prints the names of all the methods defined in a module, as a demonstration of walking through the abstract syntax tree produced by the parser. dumppyc.py Dumps the contents of a .pyc file, printing the attributes of the code object followed by a code disassembly. regrtest.py Runs the Python test suite using bytecode generated by the pure-Python compiler code instead of the builtin compiler. setup.py Setup file for installing the compiler code as a package.