SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 0 Python

gh-131421: fix ASDL grammar for `Dict` to have an `expr?*` keys field (#131419)

In the `ast` documentation for Python:

* https://docs.python.org/3/library/ast.html#ast.Dict
it is made clear that:

> When doing dictionary unpacking using dictionary literals the expression to be expanded goes in the values list, with a `None` at the corresponding position in `keys`.

Hence, `keys` is really a `expr?*` and *not* a `expr*`.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
S
Samuel committed
30840706b029645b9631b92c687834fcced6413e
Parent: af5799f
Committed by GitHub <noreply@github.com> on 5/4/2025, 11:03:38 PM