def __getattr__(self, key):
# evaluate nested format-string parameters, update format results
value, lastValue = super(paramDict, self).__getitem__(key), None
while id(lastValue) != id(value):
lastValue = value
if isinstance(value, str):
if value in self and value != key:
value = getattr(self, value)
elif reFormatString.search(value):
value = value %self
elif (inspect.isroutine(value) and
not isinstance(value, IgnoreFunc)):
value = value(self)
self[key] = value
return value
################################################## class Permutation
评论列表
文章目录