def method2hideout(cls, owner, method): """ owner needs to be passed because classmethod has no "__self__" before decorator """ dict_method2hideout = AttributeTool.get_or_init( owner, CacheManager.Constant.ATTRIBUTE_NAME, {}) hideout = DictTool.get_or_init(dict_method2hideout, FunctionTool.func2name(method), {}) return hideout
def owner_function2method(cls, owner, function): return getattr(owner, FunctionTool.func2name(function))