]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-104943: Remove mentions of old Python versions (#104945)
authorTomas R <tomas.roun8@gmail.com>
Fri, 26 May 2023 06:34:17 +0000 (08:34 +0200)
committerGitHub <noreply@github.com>
Fri, 26 May 2023 06:34:17 +0000 (23:34 -0700)
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 13f0883e3bfcc67fbfbaf940e23124c30852e65b..8c874797d290c0fa4dce3907254fd8fbafc98aac 100644 (file)
@@ -2709,7 +2709,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
@@ -2726,9 +2726,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`.