mirror of
https://github.com/python/cpython.git
synced 2025-08-08 10:58:51 +00:00
[3.12] gh-104943: Remove mentions of old Python versions (GH-104945) (#104963)
(cherry picked from commit 46857d0b2a
)
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
This commit is contained in:
parent
bd2cc41d38
commit
6324458bef
2 changed files with 2 additions and 4 deletions
|
@ -2715,7 +2715,7 @@ class NamedTupleMeta(type):
|
||||||
def NamedTuple(typename, fields=None, /, **kwargs):
|
def NamedTuple(typename, fields=None, /, **kwargs):
|
||||||
"""Typed version of namedtuple.
|
"""Typed version of namedtuple.
|
||||||
|
|
||||||
Usage in Python versions >= 3.6::
|
Usage::
|
||||||
|
|
||||||
class Employee(NamedTuple):
|
class Employee(NamedTuple):
|
||||||
name: str
|
name: str
|
||||||
|
@ -2732,9 +2732,6 @@ def NamedTuple(typename, fields=None, /, **kwargs):
|
||||||
|
|
||||||
Employee = NamedTuple('Employee', name=str, id=int)
|
Employee = NamedTuple('Employee', name=str, id=int)
|
||||||
|
|
||||||
In Python versions <= 3.5 use::
|
|
||||||
|
|
||||||
Employee = NamedTuple('Employee', [('name', str), ('id', int)])
|
|
||||||
"""
|
"""
|
||||||
if fields is None:
|
if fields is None:
|
||||||
fields = kwargs.items()
|
fields = kwargs.items()
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Remove mentions of old Python versions in :class:`typing.NamedTuple`.
|
Loading…
Add table
Add a link
Reference in a new issue