On Sat, 15 Feb 2014 21:01:36 +0200 Serhiy Storchaka <storchaka at gmail.com> wrote: > How Enum items should be pickled, by value or by name? > > I think that Enum will be used to collect system-depending constants, so > the value of AddressFamily.AF_UNIX can be 1 on one platform and 2 on > other. If pickle enums by value, then pickled AddressFamily.AF_INET on > on platform can be unpickled as AddressFamily.AF_UNIX on other platform. > This looks weird and contrary to the nature of enums. I agree with you, they should be pickled by name. An enum is a kind of global in this regard. (but of course, before AF_UNIX was an enum it was pickled by value) Regards Antoine.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4