summaryrefslogtreecommitdiffstats
path: root/Lib/pickle.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r--Lib/pickle.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py
index c29f2f8..88f03a4 100644
--- a/Lib/pickle.py
+++ b/Lib/pickle.py
@@ -561,7 +561,8 @@ class Pickler:
save(value)
write(SETITEMS)
return
-
+ # else (dict is empty or a singleton), fall through to the
+ # SETITEM code at the end
else: # proto 0 -- can't use EMPTY_DICT or SETITEMS
write(MARK + DICT)
self.memoize(obj)