py: Implement +, += and .extend for bytearray and array objs.

Addresses issue #994.
This commit is contained in:
Damien George
2014-11-30 00:00:55 +00:00
parent 19fb1b4dd7
commit b2e731177e
3 changed files with 100 additions and 0 deletions

12
tests/basics/array_add.py Normal file
View 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)