[Python-checkins] gh-104943: Remove mentions of old Python versions (#104945)
hauntsaninja
webhook-mailer at python.org
Fri May 26 02:34:24 EDT 2023
https://github.com/python/cpython/commit/46857d0b2a2ac6aeb6dcce2bf2c92ddf4abe7496
commit: 46857d0b2a2ac6aeb6dcce2bf2c92ddf4abe7496
branch: main
author: Tomas R <tomas.roun8 at gmail.com>
committer: hauntsaninja <12621235+hauntsaninja at users.noreply.github.com>
date: 2023-05-25T23:34:17-07:00
summary:
gh-104943: Remove mentions of old Python versions (#104945)
files:
A Misc/NEWS.d/next/Documentation/2023-05-25-22-34-31.gh-issue-104943.J2v1Pc.rst
M Lib/typing.py
diff --git a/Lib/typing.py b/Lib/typing.py
index 13f0883e3bfcc..8c874797d290c 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -2709,7 +2709,7 @@ def __new__(cls, typename, bases, ns):
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 @@ class Employee(NamedTuple):
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 0000000000000..bc4d03b8e95f8
--- /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`.
More information about the Python-checkins
mailing list