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

Nested defaultdicts do not load correctly #11

Open
shadetree01010100 opened this issue Aug 17, 2018 · 0 comments
Open

Nested defaultdicts do not load correctly #11

shadetree01010100 opened this issue Aug 17, 2018 · 0 comments

Comments

@shadetree01010100
Copy link

shadetree01010100 commented Aug 17, 2018

py 3.6, safepickle 0.2.0

>>> def newdd():
...     return defaultdict(list)
...
>>> foo=defaultdict(newdd)
>>> foo['bar']['baz'] = 'w00t'
>>> pickle.loads(pickle.dumps(foo))
defaultdict(<function newdd at 0x000000000291C158>, {'bar': defaultdict(<class 'list'>, {'baz': 'w00t'})})
>>> safepickle.loads(safepickle.dumps(foo))
defaultdict(None, {'bar': defaultdict(<class 'list'>, {'baz': 'w00t'})})
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

1 participant