Message20554
Logged In: YES
user_id=31435
This is undocumented, hence unsupported. pickle.py doesn't
allow it either. So any enhancement first requires a debate
about whether this should be a supported use (and, if it is,
pickle.py needs to be changed to match it). Before then, any
use of this is at-your-own-risk.
In the meantime, you *can* set the protocol in this
undocumented mode:
>>> import cPickle
>>> p = cPickle.Pickler(2)
>>>
Works fine. The constructor does undocumented type-
sniffing on its argument to determine whether it was passed
an integer (which is taken to be a protocol argument), or not
(then it's taken to be a file-like object).
There's no claim here that this doesn't all suck, but since it's
all undocumented and unsupported, it's allowed to suck
<wink>. |
|
Date |
User |
Action |
Args |
2007-08-23 14:21:08 | admin | link | issue939395 messages |
2007-08-23 14:21:08 | admin | create | |
|