enum 0.4.1 not pickle-firendly

A

ago

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top