mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
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:
parent
42cb462682
commit
1ce3eb5c5b
12 changed files with 167 additions and 48 deletions
|
@ -32,7 +32,7 @@ from multiprocessing.util import Finalize, info
|
|||
#
|
||||
|
||||
def reduce_array(a):
|
||||
return array.array, (a.typecode, a.tostring())
|
||||
return array.array, (a.typecode, a.tobytes())
|
||||
ForkingPickler.register(array.array, reduce_array)
|
||||
|
||||
view_types = [type(getattr({}, name)()) for name in ('items','keys','values')]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue