Closed
Description
Hi,
Excellent work.
I am trying to save the dictionary open with mappyfile in a file, using pickle
, but I get the following error:
mapy = mappyfile.open(path)
pickle.dump(mapy, open('file', 'wb'))
_pickle.PicklingError: fifth element of the tuple returned by __reduce__ must be an iterator, not odict_items.
I understand that this is the function::
def __reduce__(self):
if self.default_factory is None:
args = tuple()
else:
args = self.default_factory,
return type(self), args, None, None, self.items()
Is it possible to return an iterator
instead of self.items()
?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels