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

Function recursor1

recipes/Python/491265_Automatic_Recursion/recipe-491265.py:50–57  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

48 return _recursor
49
50def recursor1(func):
51 # for recursion with some pre-computatation;
52 co=func.func_code
53 argnames=[ co.co_varnames[i] for i in range(co.co_argcount) ]
54 def _recursor1(func_locals,**kwargs):
55 return func( *tuple([ kwargs.pop(name,func_locals[name])
56 for name in argnames ]), **kwargs )
57 return _recursor1
58
59# examples
60

Callers 1

recipe-491265.pyFile · 0.85

Calls 1

rangeFunction · 0.85

Tested by

no test coverage detected