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_property

A 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

deleter

get_func_return

ensures that the function has a return annotation, and that return annotation is in valid sort types

getter

set_cache

setter

Attributes

desc

label

must_return

private_var

return_type

stochastic

valid_types

gname

__call__(fget=None, fset=None, fdel=None, doc=None)

this will be called when input is provided before property is set

get_func_return(func)[source]

ensures that the function has a return annotation, and that return annotation is in valid sort types