Skip to content

gh-134674: remove ast.MatchStar.name class-level default value - #134683

Closed
hunterhogan wants to merge 4 commits into
python:mainfrom
hunterhogan:_main_ast_MatchStar_name
Closed

hunterhogan wants to merge 4 commits into
python:mainfrom
hunterhogan:_main_ast_MatchStar_name

Conversation

@hunterhogan

Copy link
Copy Markdown
Contributor

Note prior pull requests

Changes to and compiled from branch main

Fixes gh-134674

Problem

ast.MatchStar.name incorrectly appears to have a class-level default value when using ast.dump(). The issue causes ast.MatchStar(name=None) to display as MatchStar() instead of the expected MatchStar(name=None).

Solution

Change the ASDL definition of MatchStar, and add MatchStar to the special cases list in ast.dump() alongside Constant and MatchSingleton.

@serhiy-storchaka

Copy link
Copy Markdown
Member

This is not a correct change.

@hunterhogan
hunterhogan deleted the _main_ast_MatchStar_name branch May 28, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ast.MatchStar.name incorrectly has class-level default value

2 participants