summaryrefslogtreecommitdiff
path: root/Python/ast.c
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2020-04-02 15:34:54 -0700
committerGitHub <noreply@github.com>2020-04-02 15:34:54 -0700
commit3c3aa4516c70753de06bb142b6793d01330fcf0f (patch)
treecea6e6cc2cfc646d8ff84aff0c5bf596417e598c /Python/ast.c
parent45217af29c7f380089af17beb48a5ea0560bbb9d (diff)
downloadcpython-git-3c3aa4516c70753de06bb142b6793d01330fcf0f.tar.gz
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.
Diffstat (limited to 'Python/ast.c')
0 files changed, 0 insertions, 0 deletions