-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Document NewType.__supertype__
#104874
Labels
Comments
This was referenced May 24, 2023
AlexWaygood
pushed a commit
that referenced
this issue
May 24, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 24, 2023
(cherry picked from commit 41768a2) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This was referenced May 24, 2023
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
May 24, 2023
(cherry picked from commit 41768a2) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
AlexWaygood
pushed a commit
that referenced
this issue
May 24, 2023
AlexWaygood
pushed a commit
that referenced
this issue
May 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
typing.NewType
has always had an attribute__supertype__
pointing to its supertype. It is widely used in the wild (e.g. https://github.com/pydantic/pydantic/blob/00158878cb1c6218cd58ee62248db56c65e4172c/pydantic/_internal/_typing_extra.py#L153, https://github.com/quora/pyanalyze/blob/bd7f520adc2d8b098be657dfa514d1433bea3b0c/pyanalyze/annotations.py#L456), but not documented. Let's document it and commit to leaving it stable.Linked PRs
The text was updated successfully, but these errors were encountered: