2014-11-30 00:00:55 +00:00
|
|
|
# test array + array
|
2017-01-06 22:13:40 +00:00
|
|
|
try:
|
2019-10-22 07:33:23 +01:00
|
|
|
import uarray as array
|
2017-01-06 22:13:40 +00:00
|
|
|
except ImportError:
|
2019-10-22 07:33:23 +01:00
|
|
|
try:
|
|
|
|
import array
|
|
|
|
except ImportError:
|
|
|
|
print("SKIP")
|
|
|
|
raise SystemExit
|
2014-11-30 00:00:55 +00:00
|
|
|
|
|
|
|
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)
|