pickle magically not working
jepler at unpythonic.net
jepler at unpythonic.net
Mon Sep 16 21:01:30 EDT 2002
On Tue, Sep 17, 2002 at 12:39:40AM +0200, Michael Janssen wrote:
> Hello
>
> at least i've solved it (as a workaround), but it's pretty annoying.
> Maybe someone has an answere :-)
It's a bug, apparently. It's fixed in Python 2.3's CVS versions.
The tuple returned from time.localtime() is newly a 'time.struct_time'
(since version 2.2), not actually a tuple. pickle can't handle this.
So much for the addition of named fields to tuples being "zero impact"!
If I had to guess, I'd say the "fix" was in Pickle itself, you might turn
something up by investigating Python's CVS tree. Or somebody else might be
able to immediately indicate the relevant code...
Until then, slicing the value will work -- slicing returns a pure tuple.
Jeff
More information about the Python-list
mailing list