On 06/07/2013 10:50 AM, Mark Janssen wrote:
>>> from pickle import dumps, loads >>> Fruit.tomato is loads(dumps(Fruit.tomato)) TrueWhy 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~ _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
