[Python-checkins] bpo-40745: Fix typos in NewType docs (GH-20379)

Miss Islington (bot) webhook-mailer at python.org
Tue May 26 00:52:59 EDT 2020


https://github.com/python/cpython/commit/b38bd8888a6e90741a989db2fe321e8b98d5a5c4
commit: b38bd8888a6e90741a989db2fe321e8b98d5a5c4
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-05-25T21:52:55-07:00
summary:

bpo-40745: Fix typos in NewType docs (GH-20379)

(cherry picked from commit 2b0e654f91f28379c6c7ef5fd80e8754afb70935)

Co-authored-by: ziheng <zihenglv at gmail.com>

files:
M Doc/library/typing.rst

diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index 7269e181c7349..5fa89423d20bf 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -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::
 



More information about the Python-checkins mailing list