[Python-checkins] `typing.NewType` docs: the future performance improvements are now in the past (#105354)

JelleZijlstra webhook-mailer at python.org
Tue Jun 6 20:18:16 EDT 2023


https://github.com/python/cpython/commit/5f65ff0370e1123084ff300a5ff02cd57623b575
commit: 5f65ff0370e1123084ff300a5ff02cd57623b575
branch: main
author: Alex Waygood <Alex.Waygood at Gmail.com>
committer: JelleZijlstra <jelle.zijlstra at gmail.com>
date: 2023-06-06T17:18:09-07:00
summary:

`typing.NewType` docs: the future performance improvements are now in the past (#105354)

files:
M Doc/library/typing.rst

diff --git a/Doc/library/typing.rst b/Doc/library/typing.rst
index a9ea4b9fee3a..73e96db02dc5 100644
--- a/Doc/library/typing.rst
+++ b/Doc/library/typing.rst
@@ -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



More information about the Python-checkins mailing list