Skip to content

Commit e46c7e2

Browse files
committed
gh-131421: Fix ASDL arguments expr* kw_defaults to expr?* kw_defaults
According to the docs: > (https://docs.python.org/3.15/library/ast.html#ast.arguments) > kw_defaults is a list of default values for keyword-only arguments. If one is None, the corresponding argument is required. However, ASDL's description of `kw_defaults` is that it simply a `expr*`, and not a `expr?*` as stated by the docs.
1 parent cd2f234 commit e46c7e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Parser/Python.asdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ module Python
114114
attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)
115115

116116
arguments = (arg* posonlyargs, arg* args, arg? vararg, arg* kwonlyargs,
117-
expr* kw_defaults, arg? kwarg, expr* defaults)
117+
expr?* kw_defaults, arg? kwarg, expr* defaults)
118118

119119
arg = (identifier arg, expr? annotation, string? type_comment)
120120
attributes (int lineno, int col_offset, int? end_lineno, int? end_col_offset)

Python/Python-ast.c

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)