Skip to content

Commit 2456136

Browse files
[3.11] typing.NewType docs: the future performance improvements are now in the past (GH-105354) (#105415)
`typing.NewType` docs: the future performance improvements are now in the past (GH-105354) (cherry picked from commit 5f65ff0) Co-authored-by: Alex Waygood <[email protected]>
1 parent daf22ca commit 2456136

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Doc/library/typing.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,13 @@ See :pep:`484` for more details.
222222
.. versionadded:: 3.5.2
223223

224224
.. versionchanged:: 3.10
225-
``NewType`` is now a class rather than a function. There is some additional
226-
runtime cost when calling ``NewType`` over a regular function. However, this
227-
cost will be reduced in 3.11.0.
225+
``NewType`` is now a class rather than a function. As a result, there is
226+
some additional runtime cost when calling ``NewType`` over a regular
227+
function.
228+
229+
.. versionchanged:: 3.11
230+
The performance of calling ``NewType`` has been restored to its level in
231+
Python 3.9.
228232

229233

230234
Callable

0 commit comments

Comments
 (0)