[3.9] bpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759) by miss-islington · Pull Request #23768 · python/cpython (original) (raw)

Copy link

Contributor

@miss-islington miss-islington commented

Dec 14, 2020

edited

Loading

Add positional only args support to lib2to3 pgen2.

This adds 3.8's PEP-570 support to lib2to3's pgen2. lib2to3, while
being deprecated is still used by things to parse all versions of Python
code today. We need it to support parsing modern 3.8 and 3.9 constructs.

Also add tests for complex *expr and **expr's.
(cherry picked from commit 42c9f0f)

Co-authored-by: Gregory P. Smith greg@krypto.org

https://bugs.python.org/issue36541

Automerge-Triggered-By: GH:gpshead