treedict
treedict copied to clipboard
hasattr prevents pickling of treedict objects
There seems to be a side effect of calling the python builtin function hasattr
on a treedict object that prevents it from pickling:
To recreate:
from pickle import dumps
from treedict import TreeDict
x = TreeDict(y=1)
dumps(x) # this works first time
hasattr(x,'something_random') # returns True, incorrectly
dumps(x) # crashes during pickling
Hmmm... I will look at this. Apologies for not responding earlier. This is odd.