[Python-checkins] bpo-39491: Mention Annotated in get_origin() docstring (GH-18379)

Jakub Stasiak webhook-mailer at python.org
Thu Feb 6 20:15:20 EST 2020


https://github.com/python/cpython/commit/38aaaaac805fa30870e2d093e52a900dddde3b34
commit: 38aaaaac805fa30870e2d093e52a900dddde3b34
branch: master
author: Jakub Stasiak <jakub at stasiak.at>
committer: GitHub <noreply at github.com>
date: 2020-02-06T17:15:12-08:00
summary:

bpo-39491: Mention Annotated in get_origin() docstring (GH-18379)

I forgot to do it in https://github.com/python/cpython/pull/18260.

files:
M Lib/typing.py

diff --git a/Lib/typing.py b/Lib/typing.py
index 5a7077c27c42a..8886b08c2ec6f 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -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



More information about the Python-checkins mailing list