@@ -454,7 +454,7 @@ There are two factors that produce this result:
454
454
(the list), and both ``x `` and ``y `` refer to it.
455
455
2) Lists are :term: `mutable `, which means that you can change their content.
456
456
457
- After the call to :meth: `~list. append `, the content of the mutable object has
457
+ After the call to :meth: `! append `, the content of the mutable object has
458
458
changed from ``[] `` to ``[10] ``. Since both the variables refer to the same
459
459
object, using either name accesses the modified value ``[10] ``.
460
460
@@ -1397,7 +1397,7 @@ To see why this happens, you need to know that (a) if an object implements an
1397
1397
:meth: `~object.__iadd__ ` magic method, it gets called when the ``+= `` augmented
1398
1398
assignment
1399
1399
is executed, and its return value is what gets used in the assignment statement;
1400
- and (b) for lists, :meth: `!__iadd__ ` is equivalent to calling :meth: `~list. extend ` on the list
1400
+ and (b) for lists, :meth: `!__iadd__ ` is equivalent to calling :meth: `! extend ` on the list
1401
1401
and returning the list. That's why we say that for lists, ``+= `` is a
1402
1402
"shorthand" for :meth: `!list.extend `::
1403
1403
@@ -1903,7 +1903,7 @@ identity tests. This prevents the code from being confused by objects such as
1903
1903
``float('NaN') `` that are not equal to themselves.
1904
1904
1905
1905
For example, here is the implementation of
1906
- :meth: `collections.abc.Sequence.__contains__ `::
1906
+ :meth: `! collections.abc.Sequence.__contains__ `::
1907
1907
1908
1908
def __contains__(self, value):
1909
1909
for v in self:
0 commit comments