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

Function _wrapper

recipes/Python/577117_Super_lazy_load_object/recipe-577117.py:22–30  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

20
21 def force(k, v):
22 def _wrapper(*args, **kwargs):
23 if hasattr(T, '__loader__'):
24 T.__loader__()
25 if hasattr(T, '__cache__'):
26 c = T.__cache__
27 func = getattr(c, k)
28 return func(*args[1:], **kwargs)
29
30 return v(*args, **kwargs)
31
32 return _wrapper
33

Callers

nothing calls this directly

Calls 2

__loader__Method · 0.80
funcFunction · 0.50

Tested by

no test coverage detected