(original) (raw)

changeset: 6212:16f60cd918e0 user: Victor Stinner victor.stinner@gmail.com date: Wed Jan 27 12:19:37 2016 +0100 files: pep-0511.txt description: PEP 511 Remove changes already merged into CPython: * code.co_lnotab: support negative line number delta https://bugs.python.org/issue26107 * enhance compiler to handle correctly tuple and frozenset constants http://bugs.python.org/issue25843 * ast.Constant: http://bugs.python.org/issue26146 * enhance marshal to use the empty frozenset singleton http://bugs.python.org/issue26146 These changes were not directly related to this PEP, but more generally enhancements to write AST code transformers (especially AST optimizers). diff -r 30775037bd14 -r 16f60cd918e0 pep-0511.txt --- a/pep-0511.txt Wed Jan 27 11:55:10 2016 +0100 +++ b/pep-0511.txt Wed Jan 27 12:19:37 2016 +0100 @@ -314,7 +314,6 @@ * sys.implementation.optim_tag * sys.get_code_transformers() * sys.set_code_transformers(transformers) -* ast.Constant * ast.PyCF_TRANSFORMED_AST @@ -406,20 +405,6 @@ * Add a new compiler flag ``PyCF_TRANSFORMED_AST`` to get the transformed AST. ``PyCF_ONLY_AST`` returns the AST before the transformers. -* Add ``ast.Constant``: this type is not emited by the compiler, but - can be used in an AST transformer to simplify the code. It does not - contain line number and column offset informations on tuple or - frozenset items. -* ``PyCodeObject.co_lnotab``: line number delta becomes signed to - support moving instructions (note: need to modify MAGIC_NUMBER in - importlib). Implemented in the `issue #26107 - `_ -* Enhance the bytecode compiler to support ``tuple`` and ``frozenset`` - constants. Currently, ``tuple`` and ``frozenset`` constants are - created by the peephole transformer, after the bytecode compilation. -* ``marshal`` module: fix serialization of the empty frozenset singleton -* update ``Tools/parser/unparse.py`` to support the new ``ast.Constant`` - node type Examples/victor.stinner@gmail.com