Skip to content

Commit c6a0691

Browse files
committed
[3.7] lib2to3: Support named assignment expressions (pythonGH-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.. (cherry picked from commit 3c3aa45) Co-authored-by: Tim Hatch <[email protected]>
1 parent f4678ac commit c6a0691

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)