summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/array_micropython.py
blob: 0c1df0923b5dcf15c2d984b71d298e0ad3a94b0b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# test MicroPython-specific features of array.array
try:
    import array
except ImportError:
    import sys
    print("SKIP")
    sys.exit()

# 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])