summaryrefslogtreecommitdiffstats
path: root/Doc/tut
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-09-28 16:12:50 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-09-28 16:12:50 (GMT)
commit01ba799244388d6c5c0ada3d4d46a6218b273291 (patch)
tree47fde91f61d5d85bdf4351248896e3cc4ee5c547 /Doc/tut
parent7d88a58e851d6c4b9ac61052d54041536a1ceddd (diff)
downloadcpython-01ba799244388d6c5c0ada3d4d46a6218b273291.zip
cpython-01ba799244388d6c5c0ada3d4d46a6218b273291.tar.gz
cpython-01ba799244388d6c5c0ada3d4d46a6218b273291.tar.bz2
A number of list examples used 66.6, but I doubt there's any box on which
repr(66.6) == "66.6", so doubt that the claimed output has ever been seen. Changed it to 66.25 everywhere, and manually verified that the new claimed output is correct.
Diffstat (limited to 'Doc/tut')
-rw-r--r--Doc/tut/tut.tex18
1 files changed, 9 insertions, 9 deletions
diff --git a/Doc/tut/tut.tex b/Doc/tut/tut.tex
index 5adcafd..9cb665a 100644
--- a/Doc/tut/tut.tex
+++ b/Doc/tut/tut.tex
@@ -1749,24 +1749,24 @@ Reverse the elements of the list, in place.
An example that uses most of the list methods:
\begin{verbatim}
->>> a = [66.6, 333, 333, 1, 1234.5]
->>> print a.count(333), a.count(66.6), a.count('x')
+>>> a = [66.25, 333, 333, 1, 1234.5]
+>>> print a.count(333), a.count(66.25), a.count('x')
2 1 0
>>> a.insert(2, -1)
>>> a.append(333)
>>> a
-[66.6, 333, -1, 333, 1, 1234.5, 333]
+[66.25, 333, -1, 333, 1, 1234.5, 333]
>>> a.index(333)
1
>>> a.remove(333)
>>> a
-[66.6, -1, 333, 1, 1234.5, 333]
+[66.25, -1, 333, 1, 1234.5, 333]
>>> a.reverse()
>>> a
-[333, 1234.5, 1, 333, -1, 66.6]
+[333, 1234.5, 1, 333, -1, 66.25]
>>> a.sort()
>>> a
-[-1, 1, 66.6, 333, 333, 1234.5]
+[-1, 1, 66.25, 333, 333, 1234.5]
\end{verbatim}
@@ -1958,13 +1958,13 @@ remove slices from a list (which we did earlier by assignment of an
empty list to the slice). For example:
\begin{verbatim}
->>> a = [-1, 1, 66.6, 333, 333, 1234.5]
+>>> a = [-1, 1, 66.25, 333, 333, 1234.5]
>>> del a[0]
>>> a
-[1, 66.6, 333, 333, 1234.5]
+[1, 66.25, 333, 333, 1234.5]
>>> del a[2:4]
>>> a
-[1, 66.6, 1234.5]
+[1, 66.25, 1234.5]
\end{verbatim}
\keyword{del} can also be used to delete entire variables: