Open shadetree01010100 opened 6 years ago
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'})})
py 3.6, safepickle 0.2.0