-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-131421: Fix ASDL kw_defaults being expr* instead of expr?* (+ fix docs ASDL highlighting)
#133773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-131421: Fix ASDL kw_defaults being expr* instead of expr?* (+ fix docs ASDL highlighting)
#133773
Conversation
…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.
|
We'll just backport this to 3.14 (it'd be really weird to have the first part in 3.14 but not this one) |
|
any way I can help getting this done? |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
|
Thanks @Demonstrandum for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…*` (pythonGH-133773) Also fix docs ASDL highlighting. (cherry picked from commit f37f57d) Co-authored-by: Samuel <samuel@knutsen.co>
|
GH-143269 is a backport of this pull request to the 3.14 branch. |
|
According to the docs:
However, ASDL's description of
kw_defaultsis that it simply aexpr*, and not aexpr?*as stated by the docs.This continues the same correction for
exprDictin the ASDL in PR #131419.I also corrected the syntax highlighting regex to support the chained qualifiers syntax introduced to the ASDL.
Python.asdltype forkeysinDictliterals #131421📚 Documentation preview 📚: https://cpython-previews--133773.org.readthedocs.build/