[issue2389] Array pickling exposes internal memory representation of elements

Alexandre Vassalotti report at bugs.python.org
Tue Jul 7 01:30:41 CEST 2009


Alexandre Vassalotti <alexandre at peadrop.com> added the comment:

I know believe that arrays should be pickled as a list of values on
Python 2.x. Doing otherwise makes it impossible to unpickle arrays
coming from Python 2.x using Python 3.x, since pickle on Python 3
decodes all the strings from 2.x to Unicode.

However, we still can use the compact memory representation on Python 3.x.

So, I propose that we change the array module on Python 2.x to emit a
list instead of memory string and implement the portable array pickling
mechanism only on Python 3.x.

----------
versions: +Python 3.2 -Python 3.1
Added file: http://bugs.python.org/file14461/portable_array_pickling-2.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2389>
_______________________________________


More information about the Python-bugs-list mailing list