Lazy Attribute

Stefan H. Holek stefan at epy.co.at
Fri Nov 16 05:45:32 EST 2012


On 16.11.2012, at 11:29, Steven D'Aprano wrote:

> I'm very vaguely leaning towards this as the least-worst solution to 
> invalidating the cached value:
> 
> refresh(obj, 'attr')  # pass the instance and the name

This it exactly how lazy handles invalidation. http://lazy.readthedocs.org/en/latest/

Stefan

-- 
Stefan H. Holek
stefan at epy.co.at




More information about the Python-list mailing list