bucky.util.cached_prop

Cached property descript that will only eval on first access.

From https://stackoverflow.com/questions/4037481/caching-class-attributes-in-python

Module Contents

Classes

cached_property

Descriptor (non-data) for building an attribute on-demand on first use.

class bucky.util.cached_prop.cached_property(factory)[source]

Descriptor (non-data) for building an attribute on-demand on first use.

__get__(self, instance, owner)[source]

Get either the evaluated property or its cached value.