mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Add Pickler.clear_memo() so the pickle and cPickle modules are more similar.
This commit is contained in:
parent
56aa6280f6
commit
7f781c9aab
3 changed files with 15 additions and 4 deletions
|
@ -115,6 +115,9 @@ class Pickler:
|
|||
self.memo = {}
|
||||
self.bin = bin
|
||||
|
||||
def clear_memo(self):
|
||||
self.memo.clear()
|
||||
|
||||
def dump(self, object):
|
||||
self.save(object)
|
||||
self.write(STOP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue