From a35690a5c4433c4536856beff0968e0676d7d2c3 Mon Sep 17 00:00:00 2001 From: Xiang Zhang Date: Thu, 9 Mar 2017 12:56:21 +0800 Subject: [PATCH 1/2] bpo-29756 --- Doc/library/stdtypes.rst | 2 +- Doc/tutorial/datastructures.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 4433312fb204ec..9cf876783ec25f 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -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 | | diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 6140ece046b975..fb1fb939e7e409 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -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 equals 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 equals to *x*. Raises a :exc:`ValueError` if there is no such item. The optional arguments *start* and *end* are interpreted as in the slice From d0d84429dac1ba848a141971fc0c62f5b0679759 Mon Sep 17 00:00:00 2001 From: Xiang Zhang Date: Mon, 13 Mar 2017 10:00:24 +0800 Subject: [PATCH 2/2] fix wording --- Doc/tutorial/datastructures.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index fb1fb939e7e409..74a1ee73312fc8 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -40,7 +40,7 @@ objects: .. method:: list.remove(x) :noindex: - Remove the first item from the list whose value equals to *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 equals to *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