summaryrefslogtreecommitdiffstats
path: root/Lib/sre_compile.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-01 20:29:34 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-01 20:29:34 (GMT)
commit1ce3eb5c5b4830e69b21865e2d723e22749544e0 (patch)
tree324241bc0190ec3316b48ae4f5bd5b20e101bcf0 /Lib/sre_compile.py
parent42cb4626820e466177e49c283e37e15375c3efed (diff)
downloadcpython-1ce3eb5c5b4830e69b21865e2d723e22749544e0.zip
cpython-1ce3eb5c5b4830e69b21865e2d723e22749544e0.tar.gz
cpython-1ce3eb5c5b4830e69b21865e2d723e22749544e0.tar.bz2
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.
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r--Lib/sre_compile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index 47e1701..f52ea01 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -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