def _name(cls, l):
if getattr(cls, '_alias', None):
_alias = cls._alias
else:
return l
if isinstance(l, (set, list, tuple)):
return [ _alias.get(i, i) for i in l ]
elif isinstance(l, (dict, ExpSpace)):
d = dict(l)
for k, v in d.items():
if isinstance(v, basestring) and v in _alias:
d[k] = _alias[v]
return d
else :
return _alias.get(l, l)
### Todo:
# try to read the decorator that were called for _[post|pre]process
# * if @plot then display
# * if @tabulate then ...
评论列表
文章目录