diff options
author | Barry Warsaw <barry@python.org> | 1998-10-09 16:39:58 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1998-10-09 16:39:58 (GMT) |
commit | afd974c2abbd9ca18e1fd5d07cad79bb41638a8c (patch) | |
tree | 6a6f541a35d8a54cb6b2d714e276d72b55372542 | |
parent | dedf6d6804d7e48befbdb21627d149caca84f904 (diff) | |
download | cpython-afd974c2abbd9ca18e1fd5d07cad79bb41638a8c.zip cpython-afd974c2abbd9ca18e1fd5d07cad79bb41638a8c.tar.gz cpython-afd974c2abbd9ca18e1fd5d07cad79bb41638a8c.tar.bz2 |
Document the new list.extend() method. Interesting enough, the
canonical definition of extend() is very similar to append() except
that the former doesn't list-ify the argument!
-rw-r--r-- | Doc/lib/libstdtypes.tex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index ff31c5e..57c43d5 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -452,6 +452,8 @@ The following operations are defined on mutable sequence types (where {same as \code{\var{s}[\var{i}:\var{j}] = []}}{} \lineiii{\var{s}.append(\var{x})} {same as \code{\var{s}[len(\var{s}):len(\var{s})] = [\var{x}]}}{} + \lineiii{\var{s}.extend(\var{x})} + {same as \code{\var{s}[len(\var{s}):len(\var{s})] = \var{x}}}{(5)} \lineiii{\var{s}.count(\var{x})} {return number of \var{i}'s for which \code{\var{s}[\var{i}] == \var{x}}}{} \lineiii{\var{s}.index(\var{x})} @@ -476,6 +478,7 @@ The following operations are defined on mutable sequence types (where \stindex{del} \withsubitem{(list method)}{% \ttindex{append}% + \ttindex{extend}% \ttindex{count}% \ttindex{index}% \ttindex{insert}% @@ -509,6 +512,9 @@ 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. +\item[(5)] Raises an exception when \var{x} is not a list object. The +\method{extend()} method is experimental and not supported by mutable types +other than lists. \end{description} |