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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documents explicit type aliases #11800
Conversation
docs/source/kinds_of_types.rst
Outdated
|
||
AliasType: TypeAlias = Union[list[dict[tuple[int, str], set[int]]], tuple[str, list[str]]] | ||
|
||
Explicit type aliases solves the ambiguness and improves readability. |
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.
Explicit type aliases solves the ambiguness and improves readability. | |
Explicit type aliases are unambiguous and improve readability. |
"ambiguess" is not a word :)
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! Sometimes I make quite funny typos 馃檪
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
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, might also be worth leaving a note in https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
@hauntsaninja done! |
Refs https://www.python.org/dev/peps/pep-0613/ Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Refs https://www.python.org/dev/peps/pep-0613/ Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Refs https://www.python.org/dev/peps/pep-0613/
I hope that I am correct with mypy's version number 馃檪