nicer RegSlice.__repr__ (shows # researchers)
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 7 May 2012 13:55:17 +0000 (15:55 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 7 May 2012 13:55:17 +0000 (15:55 +0200)
sfa/storage/model.py

index 780853c..ad54cf9 100644 (file)
@@ -189,7 +189,11 @@ class RegSlice (RegRecord):
         RegRecord.__init__(self, **kwds)
 
     def __repr__ (self):
-        return RegRecord.__repr__(self).replace("Record","Slice")
+        result=RegRecord.__repr__(self).replace("Record","Slice")
+        result=result.replace(">","")
+        result += " [%d res.]"%(len(self.reg_researchers))
+        result += ">"
+        return result
 
 ####################
 class RegNode (RegRecord):