]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] GH-101100: Fix reference warnings for ``namedtuple`` (GH-110113) (#110135)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 2 Oct 2023 10:07:58 +0000 (03:07 -0700)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2023 10:07:58 +0000 (12:07 +0200)
GH-101100: Fix reference warnings for ``namedtuple`` (GH-110113)
(cherry picked from commit cbdacc738a52a876aae5b74b4665d30a5f204766)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Doc/whatsnew/2.6.rst
Misc/NEWS.d/3.8.0a1.rst

index 128407e3fba1323c3719e43f40e35641244720cd..96d9b792b3723aded3d93ca13cda875a79eb47c8 100644 (file)
@@ -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',
@@ -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.
 
index bf1cfaa9497ec258daeb46e09f3d02807c278ad7..cb635e617e3ac649b4c14f935ef5f9940765303a 100644 (file)
@@ -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.
 
 ..