]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40745: Fix typos in NewType docs (GH-20379)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 26 May 2020 04:52:55 +0000 (21:52 -0700)
committerGitHub <noreply@github.com>
Tue, 26 May 2020 04:52:55 +0000 (21:52 -0700)
(cherry picked from commit 2b0e654f91f28379c6c7ef5fd80e8754afb70935)

Co-authored-by: ziheng <zihenglv@gmail.com>
Doc/library/typing.rst

index 7269e181c73497300390a17ce6acad3079e463a1..5fa89423d20bf6bd310fd7eaeaf467a62aa8e86b 100644 (file)
@@ -1020,9 +1020,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::