diff options
author | Alex Waygood <Alex.Waygood@Gmail.com> | 2021-11-26 04:55:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 04:55:15 (GMT) |
commit | 93c65df83cef71a4bc77d71afecdec8744c4f73a (patch) | |
tree | ec3cc6cc08451f826e8c1fa46d945ff1bafb2ebc | |
parent | 97dcab783279444ff721a301e1faca6f29fdc600 (diff) | |
download | cpython-93c65df83cef71a4bc77d71afecdec8744c4f73a.zip cpython-93c65df83cef71a4bc77d71afecdec8744c4f73a.tar.gz cpython-93c65df83cef71a4bc77d71afecdec8744c4f73a.tar.bz2 |
bpo-44353: Correct docstring for `NewType` (#29785)
The docstring for `typing.NewType` is no longer strictly accurate, now that `NewType` is a class, rather than a function
-rw-r--r-- | Lib/typing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/typing.py b/Lib/typing.py index 031aa24..bdd19ca 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -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) |