]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40745: Fix typos in NewType docs (GH-20379)
authorziheng <zihenglv@gmail.com>
Tue, 26 May 2020 04:45:35 +0000 (12:45 +0800)
committerGitHub <noreply@github.com>
Tue, 26 May 2020 04:45:35 +0000 (21:45 -0700)
Doc/library/typing.rst

index fa13c07c44ea3ab246920ee6ea573518d4d4361d..e85b6d697f79d4f283a7abdfc5ebbe4809ee9809 100644 (file)
@@ -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::