bytearray: Support bytearray(int) constructor.

To create bytearray of given length.
This commit is contained in:
Paul Sokolovsky
2014-04-08 04:42:44 +03:00
parent 72cfc6ef0a
commit b9cf3d3730
2 changed files with 8 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
print(bytearray(4))
a = bytearray([1, 2, 200])
print(a[0], a[2])
print(a[-1])