diff options
author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2023-09-30 06:32:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-30 06:32:35 (GMT) |
commit | cbdacc738a52a876aae5b74b4665d30a5f204766 (patch) | |
tree | 06746b64f802ce5cdb3fa0bf826a4f441862ff84 /Doc | |
parent | 613c0d4e866341e15a66704643a6392ce49058ba (diff) | |
download | cpython-cbdacc738a52a876aae5b74b4665d30a5f204766.zip cpython-cbdacc738a52a876aae5b74b4665d30a5f204766.tar.gz cpython-cbdacc738a52a876aae5b74b4665d30a5f204766.tar.bz2 |
GH-101100: Fix reference warnings for ``namedtuple`` (#110113)
Diffstat (limited to 'Doc')
-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 f3912d4..2f749dc 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. |