|
448 | 448 |
|
449 | 449 | These represent a mutable set. They are created by the built-in :func:`set`
|
450 | 450 | constructor and can be modified afterwards by several methods, such as
|
451 |
| - :meth:`~set.add`. |
| 451 | + :meth:`add <frozenset.add>`. |
452 | 452 |
|
453 | 453 |
|
454 | 454 | Frozen sets
|
@@ -1224,7 +1224,7 @@ Special attributes
|
1224 | 1224 | * - .. attribute:: type.__firstlineno__
|
1225 | 1225 | - The line number of the first line of the class definition,
|
1226 | 1226 | including decorators.
|
1227 |
| - Setting the :attr:`__module__` attribute removes the |
| 1227 | + Setting the :attr:`~type.__module__` attribute removes the |
1228 | 1228 | :attr:`!__firstlineno__` item from the type's dictionary.
|
1229 | 1229 |
|
1230 | 1230 | .. versionadded:: 3.13
|
@@ -1847,9 +1847,9 @@ falling back to :meth:`~object.__getitem__`). [#]_
|
1847 | 1847 | When implementing a class that emulates any built-in type, it is important that
|
1848 | 1848 | the emulation only be implemented to the degree that it makes sense for the
|
1849 | 1849 | object being modelled. For example, some sequences may work well with retrieval
|
1850 |
| -of individual elements, but extracting a slice may not make sense. (One example |
1851 |
| -of this is the :class:`~xml.dom.NodeList` interface in the W3C's Document |
1852 |
| -Object Model.) |
| 1850 | +of individual elements, but extracting a slice may not make sense. |
| 1851 | +(One example of this is the :ref:`NodeList <dom-nodelist-objects>` interface |
| 1852 | +in the W3C's Document Object Model.) |
1853 | 1853 |
|
1854 | 1854 |
|
1855 | 1855 | .. _customization:
|
@@ -2641,7 +2641,7 @@ class defining the method.
|
2641 | 2641 | .. versionadded:: 3.6
|
2642 | 2642 |
|
2643 | 2643 |
|
2644 |
| -When a class is created, :meth:`type.__new__` scans the class variables |
| 2644 | +When a class is created, :meth:`!type.__new__` scans the class variables |
2645 | 2645 | and makes callbacks to those with a :meth:`~object.__set_name__` hook.
|
2646 | 2646 |
|
2647 | 2647 | .. method:: object.__set_name__(self, owner, name)
|
@@ -3087,7 +3087,7 @@ objects. The :mod:`collections.abc` module provides a
|
3087 | 3087 | Mutable sequences should provide methods :meth:`~sequence.append`,
|
3088 | 3088 | :meth:`~sequence.count`, :meth:`~sequence.index`, :meth:`~sequence.extend`,
|
3089 | 3089 | :meth:`~sequence.insert`, :meth:`~sequence.pop`, :meth:`~sequence.remove`,
|
3090 |
| -:meth:`~sequence.reverse` and :meth:`~sequence.sort`, |
| 3090 | +:meth:`~sequence.reverse` and :meth:`!sort`, |
3091 | 3091 | like Python standard :class:`list` objects.
|
3092 | 3092 | Finally, sequence types should implement addition (meaning concatenation) and
|
3093 | 3093 | multiplication (meaning repetition) by defining the methods
|
|
0 commit comments