objstr: Make sure that bytes are indexed as bytes, not as unicode.
Fixes #795.
This commit is contained in:
@@ -37,3 +37,8 @@ def gen():
|
||||
for i in range(4):
|
||||
yield i
|
||||
print(bytes(gen()))
|
||||
|
||||
# Make sure bytes are not mistreated as unicode
|
||||
x = b"\xff\x8e\xfe}\xfd\x7f"
|
||||
print(len(x))
|
||||
print(x[0], x[1], x[2], x[3])
|
||||
|
||||
Reference in New Issue
Block a user