Some exellent technical practice in the development of Juq.
def decarate_module(module, decorator: types.FunctionType):
for name in dir(module):
method = getattr(module, name)
if isinstance(method, types.FunctionType):
setattr(module, name, decorator(method))
return module
Usage: e.g. Serialize all return values for functions in a module
e.g.
def Example(object):
def __init__(self, a: int, b: str, c: str, d: str, e: str, f: str, g: str, ...):
self.a = a
self.b = b
self.c = c
...
Common method of constructor is a waste of time and code space.