[Python-checkins] python/dist/src/Doc/lib libarray.tex,1.36,1.37

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Mar 14 00:44:01 EST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17368/Doc/lib

Modified Files:
	libarray.tex 
Log Message:
SF feature request #686323:  Minor array module enhancements

array.extend() now accepts iterable arguments implements as a series
of appends.  Besides being a user convenience and matching the behavior
for lists, this the saves memory and cycles that would be used to
create a temporary array object.



Index: libarray.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** libarray.tex	18 May 2003 03:15:09 -0000	1.36
--- libarray.tex	14 Mar 2004 05:43:58 -0000	1.37
***************
*** 105,112 ****
  \end{methoddesc}
  
! \begin{methoddesc}[array]{extend}{a}
! Append array items from \var{a} to the end of the array.  The two
! arrays must have \emph{exactly} the same type code; if not,
! \exception{TypeError} will be raised.
  \end{methoddesc}
  
--- 105,115 ----
  \end{methoddesc}
  
! \begin{methoddesc}[array]{extend}{iterable}
! Append items from \var{iterable} to the end of the array.  If
! \var{iterable} is another array, it must have \emph{exactly} the same
! type code; if not, \exception{TypeError} will be raised.  If
! \var{iterable} is not an array, it must be iterable and its
! elements must be the right type to be appended to the array.
! \versionchanged[Formerly, the argument could only be another array]{2.4}
  \end{methoddesc}
  




More information about the Python-checkins mailing list