Skip to content
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

PEP 613: Change unicode quotes with ASCII quotes #2188

Merged
merged 1 commit into from
Dec 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pep-0613.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ cannot be used as a return annotation because it is not a valid type.

::

MyType: TypeAlias = ClassName
MyType: TypeAlias = "ClassName"
def foo() -> MyType: ...

Explicit aliases remove ambiguity so neither of the above errors will be
Expand Down Expand Up @@ -153,7 +153,7 @@ Explicit syntax:
x: Type[int] = int # typed global expression

x: TypeAlias = int # type alias
x: TypeAlias = MyClass # type alias
x: TypeAlias = "MyClass" # type alias


Note: The examples above illustrate implicit and explicit alias declarations in
Expand Down