mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-40745: Fix typos in NewType docs (GH-20379)
This commit is contained in:
parent
3cfe5b7b8f
commit
2b0e654f91
1 changed files with 2 additions and 2 deletions
|
|
@ -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::
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue