Commits

Lucian Brănescu-Mihăilă committed f745971 Draft

Explicit counter get/set

Comments (0)

Files changed (1)

     def __init__(self, name, value=None):
         self.name = name
 
+        self.set(value)
+
+    def set(self, value):
         if value and isinstance(int, value):
             r.set(self.name, value)
 
+    def get(self):
+        return r.get(self.name)
+
     def __repr__(self):
-        return r.get(self.name)
+        return repr(r.get(self.name))
 
     def incr(self):
         r.incr(self.name)