Issue #8990: array.fromstring() and array.tostring() get renamed to

frombytes() and tobytes(), respectively, to avoid confusion.  Furthermore,
array.frombytes(), array.extend() as well as the array.array()
constructor now accept bytearray objects.  Patch by Thomas Jollans.
This commit is contained in:
Antoine Pitrou 2010-09-01 20:29:34 +00:00
parent 42cb462682
commit 1ce3eb5c5b
12 changed files with 167 additions and 48 deletions

View file

@ -343,7 +343,7 @@ def _optimize_unicode(charset, fixup):
else:
code = 'I'
# Convert block indices to byte array of 256 bytes
mapping = array.array('b', mapping).tostring()
mapping = array.array('b', mapping).tobytes()
# Convert byte array to word array
mapping = array.array(code, mapping)
assert mapping.itemsize == _sre.CODESIZE