]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Prefer "similar" over "equivalent" in tutorial (GH-125343) (GH-125373)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 30 Oct 2024 20:34:13 +0000 (21:34 +0100)
committerGitHub <noreply@github.com>
Wed, 30 Oct 2024 20:34:13 +0000 (13:34 -0700)
Prefer "similar" over "equivalent" in tutorial (GH-125343)

In the datastructures tutorial doc, some operations are described as
"equivalent to" others. This has led to some user-confusion -- at
least in the Discourse forums -- about cases in which the operations
differ.

This change doesn't systematically eliminate the word "equivalent"
from the tutorial. It just substitutes "similar to" in several cases
in which "equivalent to" could mislead users into expecting exact
equivalence.
(cherry picked from commit 4a2282b0679bbf7b7fbd36aae1b1565145238961)

Co-authored-by: Stephen Rosen <sirosen@globus.org>
Doc/tutorial/datastructures.rst

index 73f17adeea72decc1f8167bcd37b842b7e9dc80b..31941bc112a1358efda64be37477431b16a114f8 100644 (file)
@@ -19,13 +19,13 @@ objects:
 .. method:: list.append(x)
    :noindex:
 
-   Add an item to the end of the list.  Equivalent to ``a[len(a):] = [x]``.
+   Add an item to the end of the list.  Similar to ``a[len(a):] = [x]``.
 
 
 .. method:: list.extend(iterable)
    :noindex:
 
-   Extend the list by appending all the items from the iterable.  Equivalent to
+   Extend the list by appending all the items from the iterable.  Similar to
    ``a[len(a):] = iterable``.
 
 
@@ -56,7 +56,7 @@ objects:
 .. method:: list.clear()
    :noindex:
 
-   Remove all items from the list.  Equivalent to ``del a[:]``.
+   Remove all items from the list.  Similar to ``del a[:]``.
 
 
 .. method:: list.index(x[, start[, end]])
@@ -93,7 +93,7 @@ objects:
 .. method:: list.copy()
    :noindex:
 
-   Return a shallow copy of the list.  Equivalent to ``a[:]``.
+   Return a shallow copy of the list.  Similar to ``a[:]``.
 
 
 An example that uses most of the list methods::