Skip to content

Commit b38bd88

Browse files
bpo-40745: Fix typos in NewType docs (GH-20379)
(cherry picked from commit 2b0e654) Co-authored-by: ziheng <[email protected]>
1 parent 1f2cc7c commit b38bd88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/typing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,9 +1020,9 @@ The module defines the following classes, functions and decorators:
10201020
``List[ForwardRef("SomeClass")]``. This class should not be instantiated by
10211021
a user, but may be used by introspection tools.
10221022

1023-
.. function:: NewType(typ)
1023+
.. function:: NewType(name, tp)
10241024

1025-
A helper function to indicate a distinct types to a typechecker,
1025+
A helper function to indicate a distinct type to a typechecker,
10261026
see :ref:`distinct`. At runtime it returns a function that returns
10271027
its argument. Usage::
10281028

0 commit comments

Comments
 (0)