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

Function func

recipes/Python/577207_Immutable_objectsubclass/recipe-577207.py:19–27  ·  view source on GitHub ↗
(self,*args, **kwargs)

Source from the content-addressed store, hash-verified

17
18def mutablemethod(f):
19 def func(self,*args, **kwargs):
20 if isinstance(self,Immutable):
21 old_mutable = self._mutable
22 self._mutable = True
23 res = f(self,*args, **kwargs)
24 self._mutable = old_mutable
25 else:
26 res = f(self,*args, **kwargs)
27 return res
28 return func
29
30

Callers 15

wrapperFunction · 0.50
wrapperFunction · 0.50
AreYouSingleFunction · 0.50
runFunction · 0.50
task_wrapperFunction · 0.50
mainFunction · 0.50
autoreconnectFunction · 0.50
runMethod · 0.50
_wrapperFunction · 0.50
newfuncMethod · 0.50
recipe-577959.pyFile · 0.50
_funcFunction · 0.50

Calls 1

fFunction · 0.50

Tested by

no test coverage detected