The attached allows for a Counter class to be specified in the constructor of
the Keep class.
diff -r faca3f5c1848 lib/keep.py
--- a/lib/keep.py Tue Nov 10 10:41:41 2009 -0800
+++ b/lib/keep.py Tue Jun 08 10:00:28 2010 -0700
@@ -94,11 +94,11 @@
__slots__ = []
- def __init__(self, value_spec=Keyed, mapping_class=BTree):
+ def __init__(self, value_spec=Keyed, mapping_class=BTree, counter_class=Counter):
assert isinstance(self, PersistentObject)
self.mapping = mapping_class()
self.value_spec = value_spec
- self.set_counter(Counter())
+ specify(self, key_counter=counter_class())
def set_counter(self, counter):
specify(self, key_counter=counter)
_______________________________________________
QP mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/qp