Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hasattr prevents pickling of treedict objects #9

Open
antonbass opened this issue Jun 26, 2015 · 1 comment
Open

hasattr prevents pickling of treedict objects #9

antonbass opened this issue Jun 26, 2015 · 1 comment

Comments

@antonbass
Copy link

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
@hoytak
Copy link
Owner

hoytak commented Sep 2, 2015

Hmmm... I will look at this. Apologies for not responding earlier. This is odd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants