|
453 | 453 |
|
454 | 454 | These represent a mutable set. They are created by the built-in :func:`set`
|
455 | 455 | constructor and can be modified afterwards by several methods, such as
|
456 |
| - :meth:`~set.add`. |
| 456 | + :meth:`add <frozenset.add>`. |
457 | 457 |
|
458 | 458 |
|
459 | 459 | Frozen sets
|
@@ -1272,7 +1272,7 @@ Special attributes
|
1272 | 1272 | * - .. attribute:: type.__firstlineno__
|
1273 | 1273 | - The line number of the first line of the class definition,
|
1274 | 1274 | including decorators.
|
1275 |
| - Setting the :attr:`__module__` attribute removes the |
| 1275 | + Setting the :attr:`~type.__module__` attribute removes the |
1276 | 1276 | :attr:`!__firstlineno__` item from the type's dictionary.
|
1277 | 1277 |
|
1278 | 1278 | .. versionadded:: 3.13
|
@@ -1903,9 +1903,9 @@ falling back to :meth:`~object.__getitem__`). [#]_
|
1903 | 1903 | When implementing a class that emulates any built-in type, it is important that
|
1904 | 1904 | the emulation only be implemented to the degree that it makes sense for the
|
1905 | 1905 | object being modelled. For example, some sequences may work well with retrieval
|
1906 |
| -of individual elements, but extracting a slice may not make sense. (One example |
1907 |
| -of this is the :class:`~xml.dom.NodeList` interface in the W3C's Document |
1908 |
| -Object Model.) |
| 1906 | +of individual elements, but extracting a slice may not make sense. |
| 1907 | +(One example of this is the :ref:`NodeList <dom-nodelist-objects>` interface |
| 1908 | +in the W3C's Document Object Model.) |
1909 | 1909 |
|
1910 | 1910 |
|
1911 | 1911 | .. _customization:
|
@@ -2697,7 +2697,7 @@ class defining the method.
|
2697 | 2697 | .. versionadded:: 3.6
|
2698 | 2698 |
|
2699 | 2699 |
|
2700 |
| -When a class is created, :meth:`type.__new__` scans the class variables |
| 2700 | +When a class is created, :meth:`!type.__new__` scans the class variables |
2701 | 2701 | and makes callbacks to those with a :meth:`~object.__set_name__` hook.
|
2702 | 2702 |
|
2703 | 2703 | .. method:: object.__set_name__(self, owner, name)
|
@@ -3143,7 +3143,7 @@ objects. The :mod:`collections.abc` module provides a
|
3143 | 3143 | Mutable sequences should provide methods :meth:`~sequence.append`,
|
3144 | 3144 | :meth:`~sequence.count`, :meth:`~sequence.index`, :meth:`~sequence.extend`,
|
3145 | 3145 | :meth:`~sequence.insert`, :meth:`~sequence.pop`, :meth:`~sequence.remove`,
|
3146 |
| -:meth:`~sequence.reverse` and :meth:`~sequence.sort`, |
| 3146 | +:meth:`~sequence.reverse` and :meth:`!sort`, |
3147 | 3147 | like Python standard :class:`list` objects.
|
3148 | 3148 | Finally, sequence types should implement addition (meaning concatenation) and
|
3149 | 3149 | multiplication (meaning repetition) by defining the methods
|
|
0 commit comments