Add basic implementation of bytes type, piggybacking on str.

This reuses as much str implementation as possible, from this we
can make them more separate as needed.
This commit is contained in:
Paul Sokolovsky
2014-01-24 22:50:40 +02:00
parent 2b2cb7b7f4
commit 91fb1c9b13
6 changed files with 96 additions and 24 deletions

11
tests/basics/bytes.py Normal file
View File

@@ -0,0 +1,11 @@
a = b"123"
print(a)
print(str(a))
print(repr(a))
print(a[0], a[2])
print(a[-1])
s = 0
for i in a:
s += i
print(s)