mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +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):
|
||||
"""Get the unsubscripted version of a type.
|
||||
|
||||
This supports generic types, Callable, Tuple, Union, Literal, Final and ClassVar.
|
||||
Return None for unsupported types. Examples::
|
||||
This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
|
||||
and Annotated. Return None for unsupported types. Examples::
|
||||
|
||||
get_origin(Literal[42]) is Literal
|
||||
get_origin(int) is None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue