mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[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:
parent
84133c56f3
commit
f4969eb315
1 changed files with 7 additions and 3 deletions
|
@ -236,9 +236,13 @@ See :pep:`484` for more details.
|
|||
.. versionadded:: 3.5.2
|
||||
|
||||
.. versionchanged:: 3.10
|
||||
``NewType`` is now a class rather than a function. There is some additional
|
||||
runtime cost when calling ``NewType`` over a regular function. However, this
|
||||
cost will be reduced in 3.11.0.
|
||||
``NewType`` is now a class rather than a function. As a result, there is
|
||||
some additional runtime cost when calling ``NewType`` over a regular
|
||||
function.
|
||||
|
||||
.. versionchanged:: 3.11
|
||||
The performance of calling ``NewType`` has been restored to its level in
|
||||
Python 3.9.
|
||||
|
||||
|
||||
Callable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue