diff -r c0e5164cc917 -r 5907c2b0acd7 web/component.py --- 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.