commit | 1d3a17332683bc38f8be956ac3dc9ea8fbba27af | [log] [tgz] |
---|---|---|
author | Alexandre Vassalotti <alexandre@peadrop.com> | Sat Nov 30 13:24:13 2013 -0800 |
committer | Alexandre Vassalotti <alexandre@peadrop.com> | Sat Nov 30 13:24:13 2013 -0800 |
tree | 5102c3544b9ff7f3b78e3eafdd4b2e78d8f19827 | |
parent | 72a01b29bf7ac17de81c294f4ee6e5cc7359c685 [diff] [blame] |
Issue #16231: Allow false values other than None to be used as persistent IDs.
diff --git a/Lib/pickle.py b/Lib/pickle.py index 508e858..299de16 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py
@@ -269,7 +269,7 @@ def save(self, obj): # Check for persistent id (defined by a subclass) pid = self.persistent_id(obj) - if pid: + if pid is not None: self.save_pers(pid) return