Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.11] GH-101100: Fix reference warnings for namedtuple (GH-110113) #110136

Merged
merged 1 commit into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Doc/whatsnew/2.6.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1850,8 +1850,8 @@ changes, or look through the Subversion logs for all the details.
special values and floating-point exceptions in a manner consistent
with Annex 'G' of the C99 standard.

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

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

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

Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.8.0a1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ Implement :pep:`572` (assignment expressions). Patch by Emily Morehouse.
.. nonce: voIdcp
.. section: Core and Builtins

Speed up :class:`namedtuple` attribute access by 1.6x using a C fast-path
Speed up :func:`namedtuple` attribute access by 1.6x using a C fast-path
for the name descriptors. Patch by Pablo Galindo.

..
Expand Down