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

Function wrapper

recipes/Python/578006_vector/recipe-578006.py:8–12  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

6def autocast(method): # Optional method decorator
7 @wraps(method)
8 def wrapper(self, obj):
9 try:
10 return method(self, self.__class__(*obj))
11 except TypeError:
12 return method(self, obj)
13 return wrapper
14
15################################################################################

Callers 1

recipe-267662.pyFile · 0.50

Calls 1

methodFunction · 0.85

Tested by

no test coverage detected