[Python-checkins] CVS: python/dist/src/Doc/lib libarray.tex,1.24,1.25 libstdtypes.tex,1.24,1.25
Peter Schneider-Kamp
python-dev@python.org
Mon, 31 Jul 2000 13:52:24 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv14223
Modified Files:
libarray.tex libstdtypes.tex
Log Message:
added count, extend, index, pop and remove to arraymodule
Index: libarray.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** libarray.tex 2000/04/03 20:13:52 1.24
--- libarray.tex 2000/07/31 20:52:21 1.25
***************
*** 84,87 ****
--- 84,95 ----
\end{methoddesc}
+ \begin{methoddesc}[array]{count}{x}
+ Return the number of occurences of \var{x} in the array.
+ \end{methoddesc}
+
+ \begin{methoddesc}[array]{extend}{a}
+ Append array items from \var{a} to the end of the array.
+ \end{methoddesc}
+
\begin{methoddesc}[array]{fromfile}{f, n}
Read \var{n} items (as machine values) from the file object \var{f}
***************
*** 105,108 ****
--- 113,121 ----
\end{methoddesc}
+ \begin{methoddesc}[array]{index}{x}
+ Return the smallest \var{i} such that \var{i} is the index of
+ the first occurence of \var{x} in the array.
+ \end{methoddesc}
+
\begin{methoddesc}[array]{insert}{i, x}
Insert a new item with value \var{x} in the array before position
***************
*** 110,113 ****
--- 123,132 ----
\end{methoddesc}
+ \begin{methoddesc}[array]{pop}{\optional{i}}
+ Removes the item with the index \var{i} from the array and returns
+ it. The optional argument defaults to \code{-1}, so that by default
+ the last item is removed and returned.
+ \end{methoddesc}
+
\begin{methoddesc}[array]{read}{f, n}
\deprecated {1.5.1}
***************
*** 119,122 ****
--- 138,145 ----
built-in file object; something else with a \method{read()} method won't
do.
+ \end{methoddesc}
+
+ \begin{methoddesc}[array]{remove}{x}
+ Remove the first occurence of \var{x} from the array.
\end{methoddesc}
Index: libstdtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** libstdtypes.tex 2000/07/31 16:34:46 1.24
--- libstdtypes.tex 2000/07/31 20:52:21 1.25
***************
*** 507,512 ****
\var{s}.
! \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.
--- 507,512 ----
\var{s}.
! \item[(4)] The \method{pop()} method is experimental and at the moment
! only supported by the list and array types. The optional argument
\var{i} defaults to \code{-1}, so that by default the last item is
removed and returned.