Skip to content

Commit 8a0b6f5

Browse files
committed
docs/array: Document array module.
1 parent e15fb33 commit 8a0b6f5

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/library/array.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
:mod:`array` -- arrays of numeric data
2+
======================================
3+
4+
.. module:: array
5+
:synopsis: efficient arrays of numeric data
6+
7+
See `Python array <https://docs.python.org/3/library/array.html>`_ for more
8+
information.
9+
10+
Supported format codes: ``b``, ``B``, ``h``, ``H``, ``i``, ``I``, ``l``,
11+
``L``, ``q``, ``Q``, ``f``, ``d`` (the latter 2 depending on the
12+
floating-point support).
13+
14+
Classes
15+
-------
16+
17+
.. class:: array.array(typecode, [iterable])
18+
19+
Create array with elements of given type. Initial contents of the
20+
array are given by an `iterable`. If it is not provided, an empty
21+
array is created.
22+
23+
.. method:: append(val)
24+
25+
Append new element to the end of array, growing it.
26+
27+
.. method:: extend(iterable)
28+
29+
Append new elements as contained in an iterable to the end of
30+
array, growing it.

0 commit comments

Comments
 (0)