web/component.py
changeset 10044 5907c2b0acd7
parent 10040 2ddeece84808
child 10075 136b5f995f8e
--- a/web/component.py	Wed Nov 12 14:33:12 2014 +0100
+++ b/web/component.py	Wed Oct 22 15:59:52 2014 +0200
@@ -218,6 +218,10 @@
     def render(self, w):
         w(tags.a(self.label, href=self.href, **self.attrs))
 
+    def __repr__(self):
+        return '<%s: href=%r label=%r %r>' % (self.__class__.__name__,
+                                              self.href, self.label, self.attrs)
+
 
 class Separator(object):
     """a menu separator.