延迟导入模块

(类来自 pyomo.common.dependencies)

class pyomo.common.dependencies.DeferredImportModule(indicator, deferred_submodules, submodule_name)[source]

基础类:object

模拟模块对象以支持模块的延迟导入。

当使用defer_import=True调用attempt_import()时,此对象将代替模块返回。任何尝试访问此对象属性的操作都将触发实际模块的导入,并返回相应的模块属性,或者如果模块导入失败,则引发DeferredImportError异常。

__init__(indicator, deferred_submodules, submodule_name)[source]

方法

__init__(指示器, 延迟子模块, ...)

mro()

返回一个类型的方法解析顺序。

成员文档

mro()[source]

返回一个类型的方法解析顺序。