[utils] improve repr() of RepeatList
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Mon, 05 Jul 2010 15:59:14 +0200
changeset 5883 7a5f370c5be1
parent 5882 4c7a0b139830
child 5890 141b935a38fc
[utils] improve repr() of RepeatList
utils.py
--- a/utils.py	Mon Jul 05 15:58:36 2010 +0200
+++ b/utils.py	Mon Jul 05 15:59:14 2010 +0200
@@ -121,6 +121,9 @@
     def __init__(self, size, item):
         self._size = size
         self._item = item
+    def __repr__(self):
+        return '<cubicweb.utils.RepeatList at %s item=%s size=%s>' % (
+            id(self), self._item, self._size)
     def __len__(self):
         return self._size
     def __nonzero__(self):