Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-131421: Fix ASDLkw_defaults beingexpr* instead ofexpr?* (+ 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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Demonstrandum wants to merge3 commits intopython:main
base:main
Choose a base branch
Loading
fromDemonstrandum:fix-kw_defaults-asdl

Conversation

Demonstrandum
Copy link
Contributor

@DemonstrandumDemonstrandum commentedMay 9, 2025
edited by github-actionsbot
Loading

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 ofkw_defaults is that it simply aexpr*, and not aexpr?* as stated by the docs.

This continues the same correction forexprDict in the ASDL in PR#131419.


I also corrected the syntax highlighting regex to support the chained qualifiers syntax introduced to the ASDL.

beforeafter
Screenshot 2025-05-09 at 16 17 13Screenshot 2025-05-09 at 16 21 14

📚 Documentation preview 📚:https://cpython-previews--133773.org.readthedocs.build/

…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.
@picnixz
Copy link
Member

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)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@pablogsalpablogsalAwaiting requested review from pablogsalpablogsal is a code owner

@lysnikolaoulysnikolaouAwaiting requested review from lysnikolaoulysnikolaou is a code owner

@AA-TurnerAA-TurnerAwaiting requested review from AA-TurnerAA-Turner is a code owner

@hugovkhugovkAwaiting requested review from hugovkhugovk is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Demonstrandum@picnixz

[8]ページ先頭

©2009-2025 Movatter.jp