I have a nested class:
class WidgetType(object): class FloatType(object): pass class TextType(object): pass
.. and an oject that refers the nested class type (not an instance of it) like this
class ObjectToPickle(object): def __init__(self): self.type = WidgetType.TextType
Trying to serialize an instance of the ObjectToPickle class results in:
*PicklingError: Can't pickle <class 'setmanager.app.site.widget_data_types.TextType'>*
Is there a way to pickle nested classes in python?