Skip to content

Commit dcc5610

Browse files
Python.asdl: Fix Dict variant to have an expr?* keys field.
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*`.
1 parent 49234c0 commit dcc5610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Parser/Python.asdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module Python
6363
| UnaryOp(unaryop op, expr operand)
6464
| Lambda(arguments args, expr body)
6565
| IfExp(expr test, expr body, expr orelse)
66-
| Dict(expr* keys, expr* values)
66+
| Dict(expr?* keys, expr* values)
6767
| Set(expr* elts)
6868
| ListComp(expr elt, comprehension* generators)
6969
| SetComp(expr elt, comprehension* generators)

0 commit comments

Comments
 (0)