From 1bc48d313f07378b750978a8242e6033166812f9 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Fri, 24 Feb 2017 15:18:47 +0200 Subject: [PATCH 1/2] Fix small typos in introduction and datastructures --- Doc/tutorial/datastructures.rst | 4 ++-- Doc/tutorial/introduction.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 953a68b44af7bb..06715565d7b21b 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -25,7 +25,7 @@ objects: .. method:: list.extend(L) :noindex: - Extend the list by appending all the items in the given list. Equivalent to + Extend the list by appending all the items from the iterable *L*. Equivalent to ``a[len(a):] = L``. @@ -68,7 +68,7 @@ objects: The optional arguments *start* and *end* are interpreted as in the slice notation and are used to limit the search to a particular subsequence of - *x*. The returned index is computed relative to the beginning of the full + the list. The returned index is computed relative to the beginning of the full sequence rather than the *start* argument. diff --git a/Doc/tutorial/introduction.rst b/Doc/tutorial/introduction.rst index 7e8ee3e5ea19bc..52120a0b16e75f 100644 --- a/Doc/tutorial/introduction.rst +++ b/Doc/tutorial/introduction.rst @@ -359,7 +359,7 @@ The built-in function :func:`len` returns the length of a string:: Information about string formatting with :meth:`str.format`. :ref:`old-string-formatting` - The old formatting operations invoked when strings and Unicode strings are + The old formatting operations invoked when strings are the left operand of the ``%`` operator are described in more detail here. From 137a206218e133b5d4d6d3f5b0617ccc356dd855 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Fri, 24 Feb 2017 16:19:47 +0200 Subject: [PATCH 2/2] Use iterable instead of L in the doc for list.extend --- Doc/tutorial/datastructures.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/tutorial/datastructures.rst b/Doc/tutorial/datastructures.rst index 06715565d7b21b..6140ece046b975 100644 --- a/Doc/tutorial/datastructures.rst +++ b/Doc/tutorial/datastructures.rst @@ -22,11 +22,11 @@ objects: Add an item to the end of the list. Equivalent to ``a[len(a):] = [x]``. -.. method:: list.extend(L) +.. method:: list.extend(iterable) :noindex: - Extend the list by appending all the items from the iterable *L*. Equivalent to - ``a[len(a):] = L``. + Extend the list by appending all the items from the iterable. Equivalent to + ``a[len(a):] = iterable``. .. method:: list.insert(i, x)