summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-05-26 07:15:56 (GMT)
committerGitHub <noreply@github.com>2023-05-26 07:15:56 (GMT)
commit6324458bef67c597b4278fff829b7a20cb32b64a (patch)
treed4b306af45375b7e793b63d442478d4b7752e5fb
parentbd2cc41d3832369e78ff96a78a1bf089f7d0594d (diff)
downloadcpython-6324458bef67c597b4278fff829b7a20cb32b64a.zip
cpython-6324458bef67c597b4278fff829b7a20cb32b64a.tar.gz
cpython-6324458bef67c597b4278fff829b7a20cb32b64a.tar.bz2
[3.12] gh-104943: Remove mentions of old Python versions (GH-104945) (#104963)
(cherry picked from commit 46857d0b2a2ac6aeb6dcce2bf2c92ddf4abe7496) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
-rw-r--r--Lib/typing.py5
-rw-r--r--Misc/NEWS.d/next/Documentation/2023-05-25-22-34-31.gh-issue-104943.J2v1Pc.rst1
2 files changed, 2 insertions, 4 deletions
diff --git a/Lib/typing.py b/Lib/typing.py
index dd172b1..a7b2566 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -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
index 0000000..bc4d03b
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2023-05-25-22-34-31.gh-issue-104943.J2v1Pc.rst
@@ -0,0 +1 @@
+Remove mentions of old Python versions in :class:`typing.NamedTuple`.