From c0962335b2f0029af20e3cf3e0b3fb4f13777a4e Mon Sep 17 00:00:00 2001 From: zihengCat Date: Mon, 25 May 2020 18:28:13 +0800 Subject: [PATCH 1/2] bpo-40745: fix a small typo in library/typing .rst doc --- Doc/library/typing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index fa13c07c44ea3a..e968fed127aa59 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1023,7 +1023,7 @@ The module defines the following classes, functions and decorators: .. function:: NewType(typ) - A helper function to indicate a distinct types to a typechecker, + A helper function to indicate a distinct type to a typechecker, see :ref:`distinct`. At runtime it returns a function that returns its argument. Usage:: From ce4fea49522b49762a41fe31f15fa6866a1729c7 Mon Sep 17 00:00:00 2001 From: zihengCat Date: Mon, 25 May 2020 22:48:29 +0800 Subject: [PATCH 2/2] bpo-40745: fix `NewType` function signature in library/typing .rst doc --- Doc/library/typing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index e968fed127aa59..e85b6d697f79d4 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1021,7 +1021,7 @@ The module defines the following classes, functions and decorators: ``List[ForwardRef("SomeClass")]``. This class should not be instantiated by a user, but may be used by introspection tools. -.. function:: NewType(typ) +.. function:: NewType(name, tp) A helper function to indicate a distinct type to a typechecker, see :ref:`distinct`. At runtime it returns a function that returns