Skip to content

gh-108271: Name the class in Argument Clinic alias errors for __new__ - #163014

Open
picnixz wants to merge 1 commit into
python:mainfrom
picnixz:meta/clinic/alias-error-class-name-108271
Open

picnixz wants to merge 1 commit into
python:mainfrom
picnixz:meta/clinic/alias-error-class-name-108271

Conversation

@picnixz

@picnixz picnixz commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

@serhiy-storchaka I was implementing some fix that needed that part and Opus told me that there was a bug here (where it would have used new instead of the class name, which is annoying I think?)

I have a PR (picnixz#4) in my fork that would use it and I think that's the minimal change on AC (but maybe you prefer to keep the __new__ being shown here?)

…_new__

The `TypeError` raised when both a parameter and its alias are given
named `__new__()` instead of the class for constructors declared as
`__new__`, unlike the other errors raised by the generated parsers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant