Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #33430

Re: Lazy Attribute

Subject Re: Lazy Attribute
From "Stefan H. Holek" <stefan@epy.co.at>
Date 2012-11-16 11:41 +0100
References <DUB117-W881D7D74D529D159D8B33F91520@phx.gbl>
Newsgroups comp.lang.python
Message-ID <mailman.3747.1353063984.27098.python-list@python.org> (permalink)

Show all headers | View raw


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/python-lazy-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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Lazy Attribute "Stefan H. Holek" <stefan@epy.co.at> - 2012-11-16 11:41 +0100

csiph-web