Skip to main content

new_method_proxy

Wraps a function to ensure the underlying lazy object is initialized via its _setup method before delegating the call to the wrapped instance.

def new_method_proxy(
func: function
) - > function

Creates a proxy wrapper that ensures the underlying lazy object is initialized before calling the decorated method.

Parameters

NameTypeDescription
funcfunctionThe method to be proxied, which will receive the initialized wrapped object as its first argument.

Returns

TypeDescription
functionA wrapped version of the input function that triggers object setup and delegates execution to the internal wrapped instance.