engforge.properties.cached_system_property
- class cached_system_property(fget=None, fset=None, fdel=None, doc=None, desc=None, label=None, stochastic=False)[source]
Bases:
system_propertyA system property that caches the result when nothing changes. Use for expensive functions since the checking adds some overhead
You can initalize just the functions, or precreate the object but with meta @system_property def function(…): < this uses __init__ to assign function
@system_property(desc=’really nice’,label=’funky function’) def function(…): < this uses __call__ to assign function
Methods
deleterensures that the function has a return annotation, and that return annotation is in valid sort types
getterset_cachesetterAttributes
desclabelmust_returnprivate_varreturn_typestochasticvalid_typesgname- __call__(fget=None, fset=None, fdel=None, doc=None)
this will be called when input is provided before property is set