diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-10-02 10:07:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 10:07:58 (GMT) |
commit | 6f6ca1daa4a1452bcb4a3e900767333d1f97b937 (patch) | |
tree | 26d6ed704d7c92bc4ebce2e996c2cbc68f0d477f /Doc/whatsnew | |
parent | b0a8cb2901be6b5148b3ed1213035c625349e9f0 (diff) | |
download | cpython-6f6ca1daa4a1452bcb4a3e900767333d1f97b937.zip cpython-6f6ca1daa4a1452bcb4a3e900767333d1f97b937.tar.gz cpython-6f6ca1daa4a1452bcb4a3e900767333d1f97b937.tar.bz2 |
[3.12] GH-101100: Fix reference warnings for ``namedtuple`` (GH-110113) (#110135)
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>
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/2.6.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst index 128407e..96d9b79 100644 --- a/Doc/whatsnew/2.6.rst +++ b/Doc/whatsnew/2.6.rst @@ -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. |