Serhiy Storchaka added the comment:
That is because a pickler keeps track of all pickled objects. This is needed to
preserve identity and support recursive objects.
You can disable memoizing by setting the "fast" attribute of the Pickler object.
def fastdump(obj, file):
p = pickle.Pickler(file)
p.fast = True
p.dump(obj)
But you can't pickle recursive objects in the "fast" mode.
----------
nosy: +alexandre.vassalotti, pitrou, serhiy.storchaka
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue25465>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com