]> granicus.if.org Git - python/commitdiff
bpo-29756: Improve documentation for list methods that compare items by equality...
authorXiang Zhang <angwerzx@126.com>
Mon, 13 Mar 2017 02:09:16 +0000 (10:09 +0800)
committerGitHub <noreply@github.com>
Mon, 13 Mar 2017 02:09:16 +0000 (10:09 +0800)
Doc/library/stdtypes.rst
Doc/tutorial/datastructures.rst

index 4433312fb204ec0ed61d87b542872db11d110080..9cf876783ec25fb746fddda93196c61440b07304 100644 (file)
@@ -1084,7 +1084,7 @@ accepts integers that meet the value restriction ``0 <= x <= 255``).
 |                              | also removes it from *s*       |                     |
 +------------------------------+--------------------------------+---------------------+
 | ``s.remove(x)``              | remove the first item from *s* | \(3)                |
-|                              | where ``s[i] == x``            |                     |
+|                              | where ``s[i]`` is equal to *x* |                     |
 +------------------------------+--------------------------------+---------------------+
 | ``s.reverse()``              | reverses the items of *s* in   | \(4)                |
 |                              | place                          |                     |
index 6140ece046b9754bc752e673c7f36799afd72959..74a1ee73312fc8771f3348030defd598246c90da 100644 (file)
@@ -40,7 +40,7 @@ objects:
 .. method:: list.remove(x)
    :noindex:
 
-   Remove the first item from the list whose value is *x*.  It is an error if
+   Remove the first item from the list whose value is equal to *x*.  It is an error if
    there is no such item.
 
 
@@ -63,7 +63,7 @@ objects:
 .. method:: list.index(x[, start[, end]])
    :noindex:
 
-   Return zero-based index in the list of the first item whose value is *x*.
+   Return zero-based index in the list of the first item whose value is equal to *x*.
    Raises a :exc:`ValueError` if there is no such item.
 
    The optional arguments *start* and *end* are interpreted as in the slice