]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-104943: Remove mentions of old Python versions (GH-104945) (#104962)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 26 May 2023 07:13:45 +0000 (00:13 -0700)
committerGitHub <noreply@github.com>
Fri, 26 May 2023 07:13:45 +0000 (07:13 +0000)
(cherry picked from commit 46857d0b2a2ac6aeb6dcce2bf2c92ddf4abe7496)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Lib/typing.py
Misc/NEWS.d/next/Documentation/2023-05-25-22-34-31.gh-issue-104943.J2v1Pc.rst [new file with mode: 0644]

index 921542f49c3242eb3236f834f9dc00591c072cd4..814020b872f585afa27fbc182c8a4cd8562e579a 100644 (file)
@@ -2876,7 +2876,7 @@ class NamedTupleMeta(type):
 def NamedTuple(typename, fields=None, /, **kwargs):
     """Typed version of namedtuple.
 
-    Usage in Python versions >= 3.6::
+    Usage::
 
         class Employee(NamedTuple):
             name: str
@@ -2893,9 +2893,6 @@ def NamedTuple(typename, fields=None, /, **kwargs):
 
         Employee = NamedTuple('Employee', name=str, id=int)
 
-    In Python versions <= 3.5 use::
-
-        Employee = NamedTuple('Employee', [('name', str), ('id', int)])
     """
     if fields is None:
         fields = kwargs.items()
diff --git a/Misc/NEWS.d/next/Documentation/2023-05-25-22-34-31.gh-issue-104943.J2v1Pc.rst b/Misc/NEWS.d/next/Documentation/2023-05-25-22-34-31.gh-issue-104943.J2v1Pc.rst
new file mode 100644 (file)
index 0000000..bc4d03b
--- /dev/null
@@ -0,0 +1 @@
+Remove mentions of old Python versions in :class:`typing.NamedTuple`.