summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2002-05-01 20:33:53 (GMT)
committerFred Drake <fdrake@acm.org>2002-05-01 20:33:53 (GMT)
commit7f781c9aabe35cc674afb7dbaeef191be6b25cbb (patch)
tree17149cce24d49aed5b43af2982166ebbee99407b /Lib
parent56aa6280f6d6b6813bfba0dc1d56987d4c2fb336 (diff)
downloadcpython-7f781c9aabe35cc674afb7dbaeef191be6b25cbb.zip
cpython-7f781c9aabe35cc674afb7dbaeef191be6b25cbb.tar.gz
cpython-7f781c9aabe35cc674afb7dbaeef191be6b25cbb.tar.bz2
Add Pickler.clear_memo() so the pickle and cPickle modules are more similar.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/pickle.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index 541624a..5837884 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -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)