From 2b0e654f91f28379c6c7ef5fd80e8754afb70935 Mon Sep 17 00:00:00 2001 From: ziheng Date: Tue, 26 May 2020 12:45:35 +0800 Subject: [PATCH] bpo-40745: Fix typos in NewType docs (GH-20379) --- Doc/library/typing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index fa13c07c44e..e85b6d697f7 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -1021,9 +1021,9 @@ 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 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::