]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-104943: Remove mentions of old Python versions (GH-104945) (#104963)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 26 May 2023 07:15:56 +0000 (00:15 -0700)
committerGitHub <noreply@github.com>
Fri, 26 May 2023 07:15:56 +0000 (07:15 +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 dd172b17639b33ba61fc92c1837434bf636709cf..a7b2566b253421d6994acc4d1761d352c39c9950 100644 (file)
@@ -2715,7 +2715,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
@@ -2732,9 +2732,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`.