You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement decorator to create read-only lazy attributes #28
Replace the pattern in _data_pipeline to create objects only once and that lives forever by creating a decorator (or selecting an existent one) to lazily create attributes and cache them for the lifetime of the _data_pipeline.
We tried @cached_property and @lazy, but @cached_property is really complex and uses a lock (although it is removed in Python 3.12) and both allow writing to the property, and we need them to be read-only.
Use cases
Simplify code and improve code readability when there are many lazy attributes like in _data_pipeline
Activity
[-]Implement decorator to create lazy attributes[/-][+]Implement decorator to create read-only lazy attributes[/+]