Skip to content

Commit cbdacc7

Browse files
authored
GH-101100: Fix reference warnings for namedtuple (#110113)
1 parent 613c0d4 commit cbdacc7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/whatsnew/2.6.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1850,8 +1850,8 @@ changes, or look through the Subversion logs for all the details.
18501850
special values and floating-point exceptions in a manner consistent
18511851
with Annex 'G' of the C99 standard.
18521852

1853-
* A new data type in the :mod:`collections` module: :class:`namedtuple(typename,
1854-
fieldnames)` is a factory function that creates subclasses of the standard tuple
1853+
* A new data type in the :mod:`collections` module: ``namedtuple(typename, fieldnames)``
1854+
is a factory function that creates subclasses of the standard tuple
18551855
whose fields are accessible by name as well as index. For example::
18561856

18571857
>>> var_type = collections.namedtuple('variable',
@@ -1873,7 +1873,7 @@ changes, or look through the Subversion logs for all the details.
18731873
variable(id=1, name='amplitude', type='int', size=4)
18741874

18751875
Several places in the standard library that returned tuples have
1876-
been modified to return :class:`namedtuple` instances. For example,
1876+
been modified to return :func:`namedtuple` instances. For example,
18771877
the :meth:`Decimal.as_tuple` method now returns a named tuple with
18781878
:attr:`sign`, :attr:`digits`, and :attr:`exponent` fields.
18791879

Misc/NEWS.d/3.8.0a1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ Implement :pep:`572` (assignment expressions). Patch by Emily Morehouse.
380380
.. nonce: voIdcp
381381
.. section: Core and Builtins
382382
383-
Speed up :class:`namedtuple` attribute access by 1.6x using a C fast-path
383+
Speed up :func:`namedtuple` attribute access by 1.6x using a C fast-path
384384
for the name descriptors. Patch by Pablo Galindo.
385385

386386
..

0 commit comments

Comments
 (0)