Message352907
The docs for pickle, in python 2, say that the default pickle protocol, 0, produces ASCII. In the python 3 docs, this has changed to "human-readable". While the pickle output with protocol 0 loads fine in python2, it is definitely not human-readable, as it is not valid ASCII and contains every possible byte.
To see a simple example, run this in both python 2 and 3
import pickle
a = bytearray(range(255)) #bytes containing 0..255
b = bytes(a)
c = pickle.dumps(b,protocol=0)
print(c)#human readable in 2, not in 3
c.decode('ascii')#throws in 3, not in 2 |
|
Date |
User |
Action |
Args |
2019-09-20 22:53:12 | aggieNick02 | set | recipients:
+ aggieNick02 |
2019-09-20 22:53:12 | aggieNick02 | set | messageid: <1569019992.12.0.181360535458.issue38241@roundup.psfhosted.org> |
2019-09-20 22:53:12 | aggieNick02 | link | issue38241 messages |
2019-09-20 22:53:11 | aggieNick02 | create | |
|