not logged in | [Login]

import

import array

implemented

a=array.array(<typecode>,[intialiser])
a.append(<object_of_type_typecode>)

notes

>>> a=array.array('B',[1,2,3,4,5,6,7,8,9,10])
>>> a[0]
1
>>> a[1]
2

Only a subset of CPython typecode's are currently supported.

array.array does support the buffer protocol therefore can be used as target of pyb.ADC.read_timed or source of pyb.DAC.write_timed.

reference

CPython array's