summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/array_micropython.py
blob: 6b3dc7a93b151599f63e095bcfc09f5d0d04cd8a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# test MicroPython-specific features of array.array
try:
    import uarray as array
except ImportError:
    try:
        import array
    except ImportError:
        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])