Skip to content

Commit b2d7717

Browse files
authored
bpo-29756: Improve documentation for list methods that compare items by equality (pythonGH-572)
1 parent 0042510 commit b2d7717

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Doc/library/stdtypes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ accepts integers that meet the value restriction ``0 <= x <= 255``).
10841084
| | also removes it from *s* | |
10851085
+------------------------------+--------------------------------+---------------------+
10861086
| ``s.remove(x)`` | remove the first item from *s* | \(3) |
1087-
| | where ``s[i] == x`` | |
1087+
| | where ``s[i]`` is equal to *x* | |
10881088
+------------------------------+--------------------------------+---------------------+
10891089
| ``s.reverse()`` | reverses the items of *s* in | \(4) |
10901090
| | place | |

Doc/tutorial/datastructures.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ objects:
4040
.. method:: list.remove(x)
4141
:noindex:
4242

43-
Remove the first item from the list whose value is *x*. It is an error if
43+
Remove the first item from the list whose value is equal to *x*. It is an error if
4444
there is no such item.
4545

4646

@@ -63,7 +63,7 @@ objects:
6363
.. method:: list.index(x[, start[, end]])
6464
:noindex:
6565

66-
Return zero-based index in the list of the first item whose value is *x*.
66+
Return zero-based index in the list of the first item whose value is equal to *x*.
6767
Raises a :exc:`ValueError` if there is no such item.
6868

6969
The optional arguments *start* and *end* are interpreted as in the slice

0 commit comments

Comments
 (0)