Skip to content

Commit 4ba6fe1

Browse files
committed
Work through documentation issues
1 parent e311816 commit 4ba6fe1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/library/collections.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -849,9 +849,9 @@ they add the ability to access fields by name instead of position index.
849849
Returns a new tuple subclass named *typename*. The new subclass is used to
850850
create tuple-like objects that have fields accessible by attribute lookup as
851851
well as being indexable and iterable. Instances of the subclass also have a
852-
helpful docstring (with typename and field_names) and a helpful :meth:`_repr`
853-
method, backing the default :meth:`__repr__`, which lists the tuple contents
854-
in a ``name=value`` format.
852+
helpful docstring (with typename and field_names) and a helpful :meth:`~somenamedtuple._repr`
853+
method, backing the default :meth:`~object.__repr__`, which lists the tuple
854+
contents in a ``name=value`` format.
855855

856856
The *field_names* are a sequence of strings such as ``['x', 'y']``.
857857
Alternatively, *field_names* can be a single string with each fieldname

Doc/library/typing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2345,7 +2345,7 @@ types.
23452345
to reuse functionality from built-in classes :class:`tuple` and :class:`object`.
23462346

23472347
To allow extending named tuple's default ``__repr__``, it can be as well accessed with ``self._repr``,
2348-
as ``super().__repr__`` in a ``NamedTuple`` subclass resolves to :meth:`tuple.__repr__`:
2348+
as ``super().__repr__`` in a ``NamedTuple`` subclass resolves to ``tuple.__repr__``:
23492349

23502350
class Import(NamedTuple):
23512351
target: str

0 commit comments

Comments
 (0)