diff --git a/src/ucimlrepo/dotdict.py b/src/ucimlrepo/dotdict.py index a050ebe..5564fa6 100644 --- a/src/ucimlrepo/dotdict.py +++ b/src/ucimlrepo/dotdict.py @@ -2,4 +2,8 @@ class dotdict(dict): """dot.notation access to dictionary attributes""" __getattr__ = dict.get __setattr__ = dict.__setitem__ - __delattr__ = dict.__delitem__ \ No newline at end of file + __delattr__ = dict.__delitem__ + + # requires as suggested here in order to allow for pickling the dotdict https://stackoverflow.com/a/2050357 + def __getstate__(self): return self.__dict__ + def __setstate__(self, d): self.__dict__.update(d)