summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-06-30 16:02:35 (GMT)
committerGuido van Rossum <guido@python.org>1998-06-30 16:02:35 (GMT)
commit472b9a3f06c4c5cb1922e9aeaa9de121e54cf75c (patch)
tree08d90e62af2c25e5a4f3ef6d05f47b0aa31d0a6f
parent97ea11647261d9c1f1280a146c301e13b6391d5e (diff)
downloadcpython-472b9a3f06c4c5cb1922e9aeaa9de121e54cf75c.zip
cpython-472b9a3f06c4c5cb1922e9aeaa9de121e54cf75c.tar.gz
cpython-472b9a3f06c4c5cb1922e9aeaa9de121e54cf75c.tar.bz2
Clearly I was to quick with the previous commit...
Need to add \optional{} to sort argument too. Made x a \var in descr of pop. Fixed note for pop() and mentioned that it is experimental. Also added pop to index.
-rw-r--r--Doc/lib/libtypes.tex9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/lib/libtypes.tex b/Doc/lib/libtypes.tex
index 0dd1fef..b612a0b 100644
--- a/Doc/lib/libtypes.tex
+++ b/Doc/lib/libtypes.tex
@@ -467,12 +467,12 @@ The following operations are defined on mutable sequence types (where
{same as \code{\var{s}[\var{i}:\var{i}] = [\var{x}]}
if \code{\var{i} >= 0}}{}
\lineiii{\var{s}.pop(\optional{\var{i}})}
- {same as \code{x = \var{s}[\var{i}]; del \var{s}[\var{i}]; return x}}{(4)}
+ {same as \code{\var{x} = \var{s}[\var{i}]; del \var{s}[\var{i}]; return \var{x}}}{(4)}
\lineiii{\var{s}.remove(\var{x})}
{same as \code{del \var{s}[\var{s}.index(\var{x})]}}{(1)}
\lineiii{\var{s}.reverse()}
{reverses the items of \var{s} in place}{(3)}
- \lineiii{\var{s}.sort(\var{cmpfunc})}
+ \lineiii{\var{s}.sort(\optional{\var{cmpfunc}})}
{sort the items of \var{s} in place}{(2), (3)}
\end{tableiii}
\indexiv{operations on}{mutable}{sequence}{types}
@@ -486,6 +486,7 @@ The following operations are defined on mutable sequence types (where
\ttindex{count}
\ttindex{index}
\ttindex{insert}
+\ttindex{pop}
\ttindex{remove}
\ttindex{reverse}
\ttindex{sort}
@@ -510,7 +511,9 @@ list in place for economy of space when sorting or reversing a large
list. They don't return the sorted or reversed list to remind you of
this side effect.
-\item[(4)4] The optional argument \var{i} defaults to \code{-1}, so that
+\item[(4)] The \method{pop()} method is experimental and not supported
+by other mutable sequence types than lists.
+The optional argument \var{i} defaults to \code{-1}, so that
by default the last item is removed and returned.
\end{description}