Mercurial > p > roundup > code
view roundup/cgi/ComputedAttribute.py @ 1160:420de8f2d308
no idea why this code existed, but bye bye
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 18 Sep 2002 00:00:24 +0000 |
| parents | 55ab0c5b49f9 |
| children |
line wrap: on
line source
class ComputedAttribute: def __init__(self, callable, level): self.callable = callable self.level = level def __of__(self, *args): if self.level > 0: return self.callable if isinstance(self.callable, type('')): return getattr(args[0], self.callable) return self.callable(*args)
