Creating an array with a bytes object as initializer
should treat the bytes as it treats a string.
Not doing this broke re.compile() of big charsets.
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index 6b28052..5b66084 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -353,6 +353,7 @@
# Convert byte array to word array
mapping = array.array(code, mapping)
assert mapping.itemsize == _sre.CODESIZE
+ assert len(mapping) * mapping.itemsize == 256
header = header + mapping.tolist()
data[0:0] = header
return [(BIGCHARSET, data)]