summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-05-26 04:52:14 (GMT)
committerGitHub <noreply@github.com>2020-05-26 04:52:14 (GMT)
commit6597e2af83e947d18706a3c2a463a7b728974a64 (patch)
tree27901a6ea722ea3d892144bf3f69205071e6b0de
parentb03e0ee226b72da737dd0fbf39b635d13bcc220d (diff)
downloadcpython-6597e2af83e947d18706a3c2a463a7b728974a64.zip
cpython-6597e2af83e947d18706a3c2a463a7b728974a64.tar.gz
cpython-6597e2af83e947d18706a3c2a463a7b728974a64.tar.bz2
bpo-40745: Fix typos in NewType docs (GH-20379)
(cherry picked from commit 2b0e654f91f28379c6c7ef5fd80e8754afb70935) Co-authored-by: ziheng <zihenglv@gmail.com>
-rw-r--r--Doc/library/typing.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index fa13c07..e85b6d6 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::