From 3f2616fd507bea7251f1b350bf062888ce9b4639 Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Thu, 25 May 2023 22:15:45 +0200 Subject: [PATCH 1/2] Remove mentions of old Python versions --- Lib/typing.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Lib/typing.py b/Lib/typing.py index 85d129b8c887c4..32a6688e837a42 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -2710,7 +2710,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 @@ -2727,9 +2727,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() From 8a055c6da8f79b6beaca9c9d2ed4834a3c8b3038 Mon Sep 17 00:00:00 2001 From: Tomas Roun Date: Thu, 25 May 2023 22:37:02 +0200 Subject: [PATCH 2/2] Add news entry --- .../Documentation/2023-05-25-22-34-31.gh-issue-104943.J2v1Pc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2023-05-25-22-34-31.gh-issue-104943.J2v1Pc.rst 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 00000000000000..bc4d03b8e95f86 --- /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`.