summaryrefslogtreecommitdiff
path: root/tests/basics/array_micropython.py
blob: b92c5a9b938159342be6d4a634acef910e15db0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# test MicroPython-specific features of array.array
try:
    import array
except ImportError:
    print("SKIP")
    raise SystemExit

try:
    array.array('O')
except ValueError:
    print("SKIP")
    raise SystemExit

# arrays of objects
a = array.array('O')
a.append(1)
print(a[0])

# arrays of pointers
a = array.array('P')
a.append(1)
print(a[0])