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

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Aug 29 09:50:46 CEST 2004


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

Modified Files:
	libarray.tex 
Log Message:
SF feature request #992967:  array.array objects should support sequences.

Made the constructor accept general iterables.



Index: libarray.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libarray.tex,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- libarray.tex	14 Mar 2004 05:43:58 -0000	1.37
+++ libarray.tex	29 Aug 2004 07:50:43 -0000	1.38
@@ -41,10 +41,14 @@
 \begin{funcdesc}{array}{typecode\optional{, initializer}}
 Return a new array whose items are restricted by \var{typecode},
 and initialized from the optional \var{initializer} value, which
-must be a list or a string.  The list or string is passed to the
+must be a list, string, or iterable over elements of the
+appropriate type.
+\versionchanged[Formerly, only lists or strings were accepted]{2.4}
+If given a list or string, the initializer is passed to the
 new array's \method{fromlist()}, \method{fromstring()}, or
 \method{fromunicode()} method (see below) to add initial items to
-the array.
+the array.  Otherwise, the iterable initializer is passed to the
+\method{extend()} method.
 \end{funcdesc}
 
 \begin{datadesc}{ArrayType}



More information about the Python-checkins mailing list