@@ -748,8 +748,8 @@ stack manipulations such as ``dup``, ``drop``, ``swap``, ``over``, ``pick``,
748
748
returns or raises is then returned or raised by :meth: `~object.__getitem__ `.
749
749
750
750
Note that :meth: `__missing__ ` is *not * called for any operations besides
751
- :meth: `~object.__getitem__ `. This means that :meth: `get ` will, like normal
752
- dictionaries, return ``None `` as a default rather than using
751
+ :meth: `~object.__getitem__ `. This means that :meth: `~dict. get ` will, like
752
+ normal dictionaries, return ``None `` as a default rather than using
753
753
:attr: `default_factory `.
754
754
755
755
@@ -849,8 +849,9 @@ they add the ability to access fields by name instead of position index.
849
849
Returns a new tuple subclass named *typename *. The new subclass is used to
850
850
create tuple-like objects that have fields accessible by attribute lookup as
851
851
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 which lists the tuple contents in a ``name=value `` format.
852
+ helpful docstring (with *typename * and *field_names *) and a helpful
853
+ :meth: `~object.__repr__ ` method which lists the tuple contents in a ``name=value ``
854
+ format.
854
855
855
856
The *field_names * are a sequence of strings such as ``['x', 'y'] ``.
856
857
Alternatively, *field_names * can be a single string with each fieldname
@@ -894,10 +895,10 @@ they add the ability to access fields by name instead of position index.
894
895
Added the *module * parameter.
895
896
896
897
.. versionchanged :: 3.7
897
- Removed the *verbose * parameter and the :attr: `_source ` attribute.
898
+ Removed the *verbose * parameter and the :attr: `! _source ` attribute.
898
899
899
900
.. versionchanged :: 3.7
900
- Added the *defaults * parameter and the :attr: `_field_defaults `
901
+ Added the *defaults * parameter and the :attr: `~somenamedtuple. _field_defaults `
901
902
attribute.
902
903
903
904
.. doctest ::
@@ -1103,7 +1104,7 @@ Some differences from :class:`dict` still remain:
1103
1104
A regular :class: `dict ` can emulate the order sensitive equality test with
1104
1105
``p == q and all(k1 == k2 for k1, k2 in zip(p, q)) ``.
1105
1106
1106
- * The :meth: `popitem ` method of :class: `OrderedDict ` has a different
1107
+ * The :meth: `~OrderedDict. popitem ` method of :class: `OrderedDict ` has a different
1107
1108
signature. It accepts an optional argument to specify which item is popped.
1108
1109
1109
1110
A regular :class: `dict ` can emulate OrderedDict's ``od.popitem(last=True) ``
@@ -1113,7 +1114,7 @@ Some differences from :class:`dict` still remain:
1113
1114
with ``(k := next(iter(d)), d.pop(k)) `` which will return and remove the
1114
1115
leftmost (first) item if it exists.
1115
1116
1116
- * :class: `OrderedDict ` has a :meth: `move_to_end ` method to efficiently
1117
+ * :class: `OrderedDict ` has a :meth: `~OrderedDict. move_to_end ` method to efficiently
1117
1118
reposition an element to an endpoint.
1118
1119
1119
1120
A regular :class: `dict ` can emulate OrderedDict's ``od.move_to_end(k,
@@ -1124,7 +1125,7 @@ Some differences from :class:`dict` still remain:
1124
1125
OrderedDict's ``od.move_to_end(k, last=False) `` which moves the key
1125
1126
and its associated value to the leftmost (first) position.
1126
1127
1127
- * Until Python 3.8, :class: `dict ` lacked a :meth: `__reversed__ ` method.
1128
+ * Until Python 3.8, :class: `dict ` lacked a :meth: `~object. __reversed__ ` method.
1128
1129
1129
1130
1130
1131
.. class :: OrderedDict([items])
@@ -1179,7 +1180,7 @@ anywhere a regular dictionary is used.
1179
1180
1180
1181
.. versionchanged :: 3.6
1181
1182
With the acceptance of :pep: `468 `, order is retained for keyword arguments
1182
- passed to the :class: `OrderedDict ` constructor and its :meth: `update `
1183
+ passed to the :class: `OrderedDict ` constructor and its :meth: `~dict. update `
1183
1184
method.
1184
1185
1185
1186
.. versionchanged :: 3.9
0 commit comments