[Python-Dev] doctest and pickle
Ethan Furman
ethan at stoneleaf.us
Fri Jun 7 19:55:59 CEST 2013
More information about the Python-Dev mailing list
Fri Jun 7 19:55:59 CEST 2013
- Previous message: [Python-Dev] doctest and pickle
- Next message: [Python-Dev] doctest and pickle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 06/07/2013 10:50 AM, Mark Janssen wrote: >> >>> from pickle import dumps, loads >> >>> Fruit.tomato is loads(dumps(Fruit.tomato)) >> True > > 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. > You're making a circular loop using "is" Huh? -- ~Ethan~
- Previous message: [Python-Dev] doctest and pickle
- Next message: [Python-Dev] doctest and pickle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list