mirror of
https://github.com/python/cpython.git
synced 2025-12-31 12:33:28 +00:00
gh-104943: Remove mentions of old Python versions (#104945)
This commit is contained in:
parent
2cf04e455d
commit
46857d0b2a
2 changed files with 2 additions and 4 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Remove mentions of old Python versions in :class:`typing.NamedTuple`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue