[Python-Dev] doctest and pickle (original) (raw)
Mark Janssen dreamingforward at gmail.com
Fri Jun 7 21:25:44 CEST 2013
- Previous message: [Python-Dev] doctest and pickle
- Next message: [Python-Dev] doctest and pickle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Why are you using is here instead of ==?
I'm using
is
because I'm verifying that the instance returned bypickle.loads
is the exact same object as the instance fed intopickle.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?
-- MarkJ Tacoma, Washington
- Previous message: [Python-Dev] doctest and pickle
- Next message: [Python-Dev] doctest and pickle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]