-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Rename TypeExpr to TypeForm #475
Conversation
No backwards compatibility required because we never released TypeExpr. Also took the opportunity to expand the docstring.
src/typing_extensions.py
Outdated
"""Special typing form used to represent a type expression. | ||
@_TypeFormForm | ||
def TypeForm(self, parameters): | ||
"""A special typing construct to represent valid type expressions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This phrasing is subtly confusing in the same way that earlier drafts of the PEP were. A TypeForm
doesn't represent a type expression. It represents the set of runtime objects that encode the information in a type expression. This is the reason we moved away from the TypeExpr
terminology. I recommend using the phrasing from the latest draft of the PEP. I tried hard to make that phrasing as clear as possible to avoid such confusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I rewrote the docstring to align with the Specification section of PEP 747.
Thanks @JelleZijlstra ! Getting |
No backwards compatibility required because we never released
TypeExpr.
Also took the opportunity to expand the docstring.