[3.12] typing.NewType docs: the future performance improvements are now in the past (GH-105354) (#105414)

`typing.NewType` docs: the future performance improvements are now in the past (GH-105354)
(cherry picked from commit 5f65ff0370)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Miss Islington (bot) 2023-06-06 20:55:37 -07:00 committed by GitHub
parent 84133c56f3
commit f4969eb315
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -236,9 +236,13 @@ See :pep:`484` for more details.
.. versionadded:: 3.5.2 .. versionadded:: 3.5.2
.. versionchanged:: 3.10 .. versionchanged:: 3.10
``NewType`` is now a class rather than a function. There is some additional ``NewType`` is now a class rather than a function. As a result, there is
runtime cost when calling ``NewType`` over a regular function. However, this some additional runtime cost when calling ``NewType`` over a regular
cost will be reduced in 3.11.0. function.
.. versionchanged:: 3.11
The performance of calling ``NewType`` has been restored to its level in
Python 3.9.
Callable Callable