Open hulsed opened 1 month ago
If class Newdataclass is defined in the module then does_it_pickle = dill.pickles(inputobj, byref=True)
works for me.
From docstring of dill.dumps
:
''' If byref=True, then dill behaves a lot more like pickle as certain objects (like modules) are pickled by reference as opposed to attempting to pickle the object itself. '''
If I use the
dill
module to check whether dataclasses pickle, it throws some errors/warnings and returns false.For example, in the following example:
does_it_pickle returns False while the following warnings are thrown to the console: