return origin\r
return decorator\r
\r
- raise Exception('Not an decoratable function: %s' % origin.name)\r
+ raise TypeError('Not a decoratable function: %s' % origin.__name__)\r
\r
def decorator(fn):\r
origin.decorate(fn, needs_origin)\r
return decorator\r
\r
\r
+def decorate_all(module):\r
+ [setattr(module, n, decoratable(f)) for n, f in\r
+ [(n, getattr(module, n)) for n in dir(module)]\r
+ if (callable(f)) and (not inspect.isclass(f)) and (f.__module__ == module.__name__)]\r
+\r
+\r
\r
\r
\r