Lazy#
Lazy evaluation attributes.
- class lazyattr(func)[source]#
Bases:
objectAttribute whose value is computed on first access.
- func#
- lazy_mixin(class_path)[source]#
Injects mixin methods on first access, then self-destructs. The mixin module (and its deps like matplotlib) is never imported until someone actually calls a mixed-in method.
Arguments
- class_pathstr
The dotted path to the mixin class, e.g. “ClearMap.Visualization.Plotting.PlottingMixin”.