cached_property#
- class seli.cached_property(func)[source]#
Bases:
propertyA property that caches the result of a function.
The cache is stored as a weak reference to the instance, so it will be automatically removed when the instance is garbage collected. This also makes the cached property work with immutable instances, and be invisible to the module system.
Attributes Summary
Methods Summary
Descriptor to obtain a copy of the property with a different deleter.
Descriptor to obtain a copy of the property with a different getter.
Descriptor to obtain a copy of the property with a different setter.
Attributes Documentation
- fdel#
- fget#
- fset#
Methods Documentation
- deleter()#
Descriptor to obtain a copy of the property with a different deleter.
- getter()#
Descriptor to obtain a copy of the property with a different getter.
- setter()#
Descriptor to obtain a copy of the property with a different setter.