cpython/Lib/lib2to3
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
..
fixes bpo-38080: Added "getproxies" to urllib fixes in the 2to3 tool (GH-16167) 2020-03-11 23:51:20 +00:00
pgen2 lib2to3: Support named assignment expressions (GH-12702) 2020-04-02 15:34:54 -07:00
tests lib2to3: Support named assignment expressions (GH-12702) 2020-04-02 15:34:54 -07:00
Grammar.txt lib2to3: Support named assignment expressions (GH-12702) 2020-04-02 15:34:54 -07:00
PatternGrammar.txt
__init__.py
__main__.py Merged revisions 88535 via svnmerge from 2011-02-24 01:41:46 +00:00
btm_matcher.py bpo-29957: change LBYL key lookup to dict.setdefault (#938) 2017-04-01 23:02:31 -07:00
btm_utils.py Issue #27076: Doc, comment and tests spelling fixes 2016-05-26 05:35:26 +00:00
fixer_base.py rm unused import 2016-12-05 22:30:55 -08:00
fixer_util.py Fix typos in comments, docs and test names (#15018) 2019-07-30 18:16:13 -04:00
main.py bpo-39313: Add an option to RefactoringTool for using exec as a function (GH-17967) 2020-01-12 14:13:31 -08:00
patcomp.py remove unused import (#5040) 2017-12-28 23:24:40 -08:00
pygram.py bpo-23896: Add a grammar where exec isn't a stmt (#13272) 2019-05-20 13:27:10 -07:00
pytree.py bpo-29776: Use decorator syntax for properties. (#585) 2017-03-19 08:40:32 +02:00
refactor.py bpo-39313: Add an option to RefactoringTool for using exec as a function (GH-17967) 2020-01-12 14:13:31 -08:00