cpython/Lib/lib2to3/pgen2
Tim Hatch 3c3aa4516c
lib2to3: Support named assignment expressions (GH-12702)
There are two copies of the grammar -- the one used by Python itself as
Grammar/Grammar, and the one used by lib2to3 which has necessarily diverged at
Lib/lib2to3/Grammar.txt because it needs to support older syntax an we want it
to be reasonable stable to avoid requiring fixer rewrites.

This brings suport for syntax like `if x:= foo():` to match what the live
Python grammar does.

This should've been added at the time of the walrus operator itself, but lib2to3 being
independent is often overlooked.  So we do consider this a bugfix rather than enhancement.
2020-04-02 15:34:54 -07:00
..
__init__.py
conv.py
driver.py bpo-35202: Remove unused imports in Lib directory. (GH-10446) 2018-11-10 09:22:02 +02:00
grammar.py lib2to3: Support named assignment expressions (GH-12702) 2020-04-02 15:34:54 -07:00
literals.py bpo-29762: More use "raise from None". (#569) 2017-04-05 09:37:24 +03:00
parse.py bpo-35312: Make lib2to3.pgen2.parse.ParseError round-trip pickle-able. (GH-10710) 2018-11-27 20:39:49 +02:00
pgen.py lib2to3.pgen3.driver.load_grammar() now creates a stable cache file 2016-09-08 00:40:07 +00:00
token.py lib2to3: Support named assignment expressions (GH-12702) 2020-04-02 15:34:54 -07:00
tokenize.py lib2to3: Support named assignment expressions (GH-12702) 2020-04-02 15:34:54 -07:00