[kupfer] Pickle obj.base's _NonpersistentToken to None using sum
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] Pickle obj.base's _NonpersistentToken to None using sum
- Date: Sun, 24 Jan 2010 21:36:02 +0000 (UTC)
commit ebd8c908004baa8a779e9db5786c826891611a76
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Sun Jan 24 22:28:32 2010 +0100
Pickle obj.base's _NonpersistentToken to None using sum
Simply reducing the token to the call 'sum((), None)' that always
returns None is enough.
kupfer/obj/base.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/obj/base.py b/kupfer/obj/base.py
index 5f659b6..4b10fae 100644
--- a/kupfer/obj/base.py
+++ b/kupfer/obj/base.py
@@ -158,7 +158,7 @@ class _NonpersistentToken (object):
def __nonzero__(self):
return bool(self.object)
def __reduce__(self):
- return (eval, ("None", ))
+ return (sum, ((), None))
class Leaf (KupferObject):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]