tokkee.org
Code
projects
/
roundup.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
missed some of the creator prop spec fixes .. metakit may be busted by this
[roundup.git]
/
roundup
/
cgi
/
ComputedAttribute.py
1
class ComputedAttribute:
2
def __init__(self, callable, level):
3
self.callable = callable
4
self.level = level
5
def __of__(self, *args):
6
if self.level > 0:
7
return self.callable
8
if isinstance(self.callable, type('')):
9
return getattr(args[0], self.callable)
10
return self.callable(*args)
11