From 563019b82626c63530cd7483ee17109a80de7c35 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Wed, 7 Jun 2023 01:18:09 +0100 Subject: [PATCH] `typing.NewType` docs: the future performance improvements are now in the past (GH-105354) (cherry picked from commit 5f65ff0370e1123084ff300a5ff02cd57623b575) Co-authored-by: Alex Waygood --- Doc/library/typing.rst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst index d2acac87b880ce..6d398eae29326f 100644 --- a/Doc/library/typing.rst +++ b/Doc/library/typing.rst @@ -222,9 +222,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