[issue5509] cPickle - module object has no attribute

rb report at bugs.python.org
Sat Dec 5 19:51:51 CET 2009


rb <rb-oss-2 at justgohome.co.uk> added the comment:

I've just been stung by this. I've noticed that this seems to apply to
both cPickle and pickle. Even worse, it causes different behaviour when
a program is run under pdb because __main__ is suddenly pdb rather than
the program itself.

So, in summary, neither pickle nor cPickle can pickle a class if it is
not defined in its own module? Surely this is an obvious deficiency of
pickle and if it is not going to be fixed it should at least be
documented as such?

----------
nosy: +rb

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5509>
_______________________________________


More information about the Python-bugs-list mailing list