MCPcopy Create free account
hub / github.com/ActiveState/code / SimpleWrapper

Class SimpleWrapper

recipes/Python/389170_SimpleWrapper/recipe-389170.py:6–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4"""
5
6class SimpleWrapper:
7 class MethodCall:
8 def __init__(self, function, *params):
9 self.function = function
10 self.default_params = params
11 def __call__(self, *params):
12 return self.function(*(self.default_params + params))
13 def __init__(self, ns, *params):
14 self.params = params
15 self.ns = ns
16 def __getattr__(self, attr):
17 return SimpleWrapper.MethodCall(self.ns[attr], *self.params);
18
19if __name__ == '__main__':
20

Callers 2

recipe-389170.pyFile · 0.85
connect_dbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected