mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
py: Implement +, += and .extend for bytearray and array objs.
Addresses issue #994.
This commit is contained in:
12
tests/basics/array_add.py
Normal file
12
tests/basics/array_add.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# test array + array
|
||||
import array
|
||||
|
||||
a1 = array.array('I', [1])
|
||||
a2 = array.array('I', [2])
|
||||
print(a1 + a2)
|
||||
|
||||
a1 += array.array('I', [3, 4])
|
||||
print(a1)
|
||||
|
||||
a1.extend(array.array('I', [5]))
|
||||
print(a1)
|
||||
Reference in New Issue
Block a user