summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libarray.tex
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-08-29 07:50:43 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-08-29 07:50:43 (GMT)
commit6ab78cd0c055462af4f5a6c59b9f310a83734c45 (patch)
treee997501de3a39f1e79a77ecf559000dee5ebf5f7 /Doc/lib/libarray.tex
parentdf7a208ff70a66f4384252d12768dbd9e7c60204 (diff)
downloadcpython-6ab78cd0c055462af4f5a6c59b9f310a83734c45.zip
cpython-6ab78cd0c055462af4f5a6c59b9f310a83734c45.tar.gz
cpython-6ab78cd0c055462af4f5a6c59b9f310a83734c45.tar.bz2
SF feature request #992967: array.array objects should support sequences.
Made the constructor accept general iterables.
Diffstat (limited to 'Doc/lib/libarray.tex')
-rw-r--r--Doc/lib/libarray.tex8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/lib/libarray.tex b/Doc/lib/libarray.tex
index 6fd8b0c..e168e54 100644
--- a/Doc/lib/libarray.tex
+++ b/Doc/lib/libarray.tex
@@ -41,10 +41,14 @@ The module defines the following type:
\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}