Pickle question

Carl Banks idot at vt.edu
Sat Nov 4 00:37:26 EST 2000


Okay, I have this object, a class instance, that I want to pickle.
Except there are certain states in which the object shouldn't be
pickled.  (Specifically, the object is a node on a large tree
structure, and if I pickle the object without remembering to remove it
from the tree, it will pickle the whole tree, which in this case is
virtually all the data in the program, which is not good, but I
digress....)

Anyways, I would like the Python interpreter to cuss me out whenever I
try that.

So, what I do is add an unpicklable object as an attribute, like so:
	a.picklestop = Ellipsis

Now, my question is: is the Ellipsis object guaranteed to be
unpicklable in all future versions of Python, or might someone get
bored someday and decide to add Ellipsis support to the pickle module,
thus breaking my code?



WTF-is-the-deal-with-all-these-run-on-hyphenated-adverbs-anyways-ly
yours,


-- 
CARL BANKS                   http://filebox.vt.edu/users/cabanks1/

"I like nothing better than a good challenge.
 This is not one of them."



More information about the Python-list mailing list