MCPcopy Create free account
hub / github.com/ActiveState/code / recipe-576808.py

File recipe-576808.py

recipes/Python/576808_statemethod/recipe-576808.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1def statemethod(method):
2 def call_statemethod(self, *args, **kwargs):
3 # Use self.state.<method> if available, else method itself.
4 real_method = getattr(self.state, method.func_name, method)

Callers

nothing calls this directly

Calls 4

default_methodMethod · 0.80
newMethod · 0.45
overridden_methodMethod · 0.45
get_stateMethod · 0.45

Tested by

no test coverage detected