-
-
Notifications
You must be signed in to change notification settings - Fork 3k
NewType
documentation is incorrect
#11620
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
Labels
Comments
We can just replace "function" with "object". The overhead is still tiny, and it doesn't matter to readers of the mypy documentation exactly how NewType is implemented. |
AlexWaygood
added a commit
to AlexWaygood/mypy
that referenced
this issue
Nov 26, 2021
NewType is a class in Python >=3.10, meaning the mypy documentation is no longer accurate. Closes python#11620
Makes sense, thanks! |
hauntsaninja
pushed a commit
that referenced
this issue
Nov 26, 2021
NewType is a class in Python >=3.10, meaning the mypy documentation is no longer accurate. Closes #11620
tushar-deepsource
pushed a commit
to DeepSourceCorp/mypy
that referenced
this issue
Jan 20, 2022
NewType is a class in Python >=3.10, meaning the mypy documentation is no longer accurate. Closes python#11620
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation for
NewType
at https://mypy.readthedocs.io/en/stable/more_types.html#newtypes states:However, as the cpython documentation for
NewType
` states:In Python >=3.10,
NewType
is a class rather than a function, meaning the mypy documentation is now incorrect.I'm not immediately sure how it could be rewritten in a more accurate way that is still concise, however.
The text was updated successfully, but these errors were encountered: