[Python-Dev] when is binary mode required for pickle? (original) (raw)
Gareth McCaughan gmccaughan@synaptics-uk.com
Thu, 13 Feb 2003 10:44:29 +0000
- Previous message: [Python-Dev] Overly creative config in socketmodule.c
- Next message: [Python-Dev] when is binary mode required for pickle?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido wrote:
For most people, yes. "bin" is deprecated, "proto" should not be named (cPickle doesn't accept keyword arguments), and passing -1 is the best thing to do if you don't care about reading a pickle under an older version of Python than the one that wrote the pickle. For compatibility reasons, though, the default proto value had to remain 0.
Suggestion: pickle.LATEST_PROTOCOL = cPickle.LATEST_PROTOCOL = -1 ? (It could be spelled differently.) Or the string value "latest" could be an acceptable value of proto. Or something. Anything rather than magic numbers. :-)
-- g
- Previous message: [Python-Dev] Overly creative config in socketmodule.c
- Next message: [Python-Dev] when is binary mode required for pickle?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]