mirror of
https://github.com/python/cpython.git
synced 2025-12-05 00:52:25 +00:00
bpo-39491: Mention Annotated in get_origin() docstring (GH-18379)
I forgot to do it in https://github.com/python/cpython/pull/18260.
This commit is contained in:
parent
0d76d2bd28
commit
38aaaaac80
1 changed files with 2 additions and 2 deletions
|
|
@ -1380,8 +1380,8 @@ def _strip_annotations(t):
|
||||||
def get_origin(tp):
|
def get_origin(tp):
|
||||||
"""Get the unsubscripted version of a type.
|
"""Get the unsubscripted version of a type.
|
||||||
|
|
||||||
This supports generic types, Callable, Tuple, Union, Literal, Final and ClassVar.
|
This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
|
||||||
Return None for unsupported types. Examples::
|
and Annotated. Return None for unsupported types. Examples::
|
||||||
|
|
||||||
get_origin(Literal[42]) is Literal
|
get_origin(Literal[42]) is Literal
|
||||||
get_origin(int) is None
|
get_origin(int) is None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue