[Python-Dev] doctest and pickle

Mark Janssen dreamingforward at gmail.com
Fri Jun 7 21:25:44 CEST 2013

>> Why are you using is here instead of ==?
> I'm using `is` because I'm verifying that the instance returned by
> `pickle.loads` is the exact same object as the instance fed into
> `pickle.dumps`.  Enum members should be singletons.

I see now.  That makes sense, but I don't think you'll be able to do
that.  "Supposed to be singletons" while at the same time you are
holding two instances on the interpreter line.   How are you going to
manage that?

Tacoma, Washington

More information about the Python-Dev mailing list