optframework.utils.func.bind_methods module
Created on Fri Feb 7 08:54:38 2025
@author: px2030
- optframework.utils.func.bind_methods.bind_methods_from_module(cls, module_name)[source]
Bind all functions from a specified module to the given class.
Parameters
- clstype
The class to which the methods will be bound.
- module_namestr
The name of the module from which the methods will be imported.
- optframework.utils.func.bind_methods.bind_selected_methods_from_module(cls, module_name, methods_to_bind)[source]
Bind selected functions from a specified module to the given class.
Parameters
- clstype
The class to which the methods will be bound.
- module_namestr
The name of the module from which the methods will be imported.
- methods_to_bindlist of str
A list of method names to bind to the class.