# HG changeset patch # User Aurelien Campeas # Date 1413986392 -7200 # Node ID 5907c2b0acd7e86e57e34e605077eba6992314e6 # Parent c0e5164cc9178e22a1f2daa278b5cfc4f95c6e28 [component] give Links a __repr__ 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.