diff options
author | Fred Drake <fdrake@acm.org> | 2001-03-06 07:19:34 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-03-06 07:19:34 (GMT) |
commit | 67fdaa48834e8f03e8e81b3762e3e2a1f576bf1e (patch) | |
tree | 6b3e04994493be566213ec68990bce5e8f19c870 /Doc/tut | |
parent | 990b0fec1abc2b87dc1fb1ed1284f20888b5027e (diff) | |
download | cpython-67fdaa48834e8f03e8e81b3762e3e2a1f576bf1e.zip cpython-67fdaa48834e8f03e8e81b3762e3e2a1f576bf1e.tar.gz cpython-67fdaa48834e8f03e8e81b3762e3e2a1f576bf1e.tar.bz2 |
Correct typos in Ping's email address.
Remove premature use of negative indexes in string operation examples;
negative indexes have not been explained at that point, and the use of
negative indexes are not necessary for the examples.
Diffstat (limited to 'Doc/tut')
-rw-r--r-- | Doc/tut/tut.tex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex index 1bdeefb..60245a8 100644 --- a/Doc/tut/tut.tex +++ b/Doc/tut/tut.tex @@ -620,7 +620,7 @@ indexed position in the string results in an error: Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: object doesn't support item assignment ->>> word[:-1] = 'Splat' +>>> word[:1] = 'Splat' Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: object doesn't support slice assignment @@ -632,7 +632,7 @@ efficient: \begin{verbatim} >>> 'x' + word[1:] 'xelpA' ->>> 'Splat' + word[-1:] +>>> 'Splat' + word[4] 'SplatA' \end{verbatim} @@ -1645,7 +1645,7 @@ An example that uses most of the list methods: \subsection{Using Lists as Stacks \label{lists-as-stacks}} -\sectionauthor{Ka-Ping Yee}{ping@lfs.org} +\sectionauthor{Ka-Ping Yee}{ping@lfw.org} The list methods make it very easy to use a list as a stack, where the last element added is the first element retrieved (``last-in, @@ -1673,7 +1673,7 @@ first-out''). To add an item to the top of the stack, use \subsection{Using Lists as Queues \label{lists-as-queues}} -\sectionauthor{Ka-Ping Yee}{ping@lfs.org} +\sectionauthor{Ka-Ping Yee}{ping@lfw.org} You can also use a list conveniently as a queue, where the first element added is the first element retrieved (``first-in, |