Message143149
| Author |
sbt |
| Recipients |
jnoller, jwilk, rschoon.old, sbt |
| Date |
2011年08月29日.15:26:21 |
| SpamBayes Score |
1.110223e-15 |
| Marked as misclassified |
No |
| Message-id |
<1314631582.84.0.741019623515.issue8323@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Buffer objects *are* picklable with protocol 2 (but not with earlier protocols). Unfortunately, the result is not unpicklable.
This is not a problem with multiprocessing. (buffer seems to inherit __reduce__ and __reduce_ex__ from object.)
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cPickle
>>> cPickle.dumps(buffer("hello"), cPickle.HIGHEST_PROTOCOL)
'\x80\x02c__builtin__\nbuffer\nq\x01)\x81q\x02.'
>>> cPickle.loads(_)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: buffer() takes at least 1 argument (0 given) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年08月29日 15:26:23 | sbt | set | recipients:
+ sbt, jwilk, jnoller, rschoon.old |
| 2011年08月29日 15:26:22 | sbt | set | messageid: <1314631582.84.0.741019623515.issue8323@psf.upfronthosting.co.za> |
| 2011年08月29日 15:26:22 | sbt | link | issue8323 messages |
| 2011年08月29日 15:26:21 | sbt | create |
|