Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Lazy Attribute (http://www.velocityreviews.com/forums/t954555-re-lazy-attribute.html)

Stefan H. Holek 11-16-2012 10:41 AM

Re: Lazy Attribute
 
On 15.11.2012, at 20:33, Andriy Kornatskyy wrote:

> A lazy attribute is an attribute that is calculated on demand and only once.
>
> The post below shows how you can use lazy attribute in your Python class:
>
> http://mindref.blogspot.com/2012/11/...attribute.html
>
> Comments or suggestions are welcome.


There is a ready made and well tested lazy decorator at http://pypi.python.org/pypi/lazy. I even has a better name. ;-)

Since people seem to come up with their own implementations on a bi-weekly basis, I am seriously wondering how to improve its visibility. Putting it on PyPI alone does not cut it, apparently.

Stefan

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



All times are GMT. The time now is 10:18 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57