bpo-44353: Correct docstring for NewType (GH-29785)

The docstring for `typing.NewType` is no longer strictly accurate, now that `NewType` is a class, rather than a function
(cherry picked from commit 93c65df83c)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Miss Islington (bot) 2021-11-26 06:58:13 -08:00 committed by GitHub
parent 7842aed7a7
commit 3f024e27c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2427,7 +2427,7 @@ class NewType:
"""NewType creates simple unique types with almost zero
runtime overhead. NewType(name, tp) is considered a subtype of tp
by static type checkers. At runtime, NewType(name, tp) returns
a dummy function that simply returns its argument. Usage::
a dummy callable that simply returns its argument. Usage::
UserId = NewType('UserId', int)