]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Resolve reference warnings in faq/programming.rst (GH-108150) (#108170)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 20 Aug 2023 14:44:43 +0000 (07:44 -0700)
committerGitHub <noreply@github.com>
Sun, 20 Aug 2023 14:44:43 +0000 (16:44 +0200)
Resolve reference warnings in faq/programming.rst (GH-108150)
(cherry picked from commit a390ec20f5a85b9c16e8708f117667783d08863c)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Doc/faq/programming.rst
Doc/tools/.nitignore

index ab5618db84f77e13056c3bf1f62af9c985194f04..f43f69b8a1ea9169192df2627b51b394196fa72f 100644 (file)
@@ -454,7 +454,7 @@ There are two factors that produce this result:
    (the list), and both ``x`` and ``y`` refer to it.
 2) Lists are :term:`mutable`, which means that you can change their content.
 
-After the call to :meth:`~list.append`, the content of the mutable object has
+After the call to :meth:`!append`, the content of the mutable object has
 changed from ``[]`` to ``[10]``.  Since both the variables refer to the same
 object, using either name accesses the modified value ``[10]``.
 
@@ -1397,7 +1397,7 @@ To see why this happens, you need to know that (a) if an object implements an
 :meth:`~object.__iadd__` magic method, it gets called when the ``+=`` augmented
 assignment
 is executed, and its return value is what gets used in the assignment statement;
-and (b) for lists, :meth:`!__iadd__` is equivalent to calling :meth:`~list.extend` on the list
+and (b) for lists, :meth:`!__iadd__` is equivalent to calling :meth:`!extend` on the list
 and returning the list.  That's why we say that for lists, ``+=`` is a
 "shorthand" for :meth:`!list.extend`::
 
@@ -1903,7 +1903,7 @@ identity tests.  This prevents the code from being confused by objects such as
 ``float('NaN')`` that are not equal to themselves.
 
 For example, here is the implementation of
-:meth:`collections.abc.Sequence.__contains__`::
+:meth:`!collections.abc.Sequence.__contains__`::
 
     def __contains__(self, value):
         for v in self:
index d55b611a0557527bb120e4965de4ff674a66349f..a0a121b4b9dbe6fdcb1e58c825f79155b40814cf 100644 (file)
@@ -28,7 +28,6 @@ Doc/extending/newtypes.rst
 Doc/faq/design.rst
 Doc/faq/gui.rst
 Doc/faq/library.rst
-Doc/faq/programming.rst
 Doc/glossary.rst
 Doc/howto/descriptor.rst
 Doc/howto/enum.rst