enum 0.4.1 not pickle-firendly

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ago

    #1

    enum 0.4.1 not pickle-firendly

    I have started using the enum module () , at them moment pickling an
    object instance that has an EnumValues assigned to one of its
    attributes pickles the full enumeration, this is not efficient. I am
    not sure what is the best way around (I do not like the idea of having
    to use __getstate__/__setstate__ every time), but I guess that a
    EnumValue should not have a reference to an Enum instance. Maybe a
    better approach might be to have Enum as a metaclass so that each
    EnumValue only references the particular Enum class.

Working...