array.rst 801 B

1234567891011121314151617181920212223242526272829
  1. :mod:`array` -- arrays of numeric data
  2. ======================================
  3. .. module:: array
  4. :synopsis: efficient arrays of numeric data
  5. |see_cpython_module| :mod:`python:array`.
  6. Supported format codes: ``b``, ``B``, ``h``, ``H``, ``i``, ``I``, ``l``,
  7. ``L``, ``q``, ``Q``, ``f``, ``d`` (the latter 2 depending on the
  8. floating-point support).
  9. Classes
  10. -------
  11. .. class:: array.array(typecode, [iterable])
  12. Create array with elements of given type. Initial contents of the
  13. array are given by *iterable*. If it is not provided, an empty
  14. array is created.
  15. .. method:: append(val)
  16. Append new element *val* to the end of array, growing it.
  17. .. method:: extend(iterable)
  18. Append new elements as contained in *iterable* to the end of
  19. array, growing it.