Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'url:pypi': 0.03; 'attribute': 0.05; 'decorator': 0.07; 'pypi': 0.07; 'welcome.': 0.07; 'python': 0.09; ';-)': 0.11; 'to:name:python-list': 0.15; 'class:': 0.16; 'wrote:': 0.17; 'stefan': 0.17; 'putting': 0.20; 'basis,': 0.22; 'header:In-Reply-To:1': 0.25; 'wondering': 0.26; 'post': 0.28; 'once.': 0.29; 'received:192.168.1.3': 0.29; 'url:2012': 0.30; 'url:python': 0.32; 'comments': 0.33; 'to:addr :python-list': 0.33; 'there': 0.35; 'url:org': 0.36; 'alone': 0.36; 'charset:us-ascii': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'shows': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'your': 0.60; 'header:Message-Id:1': 0.62; 'url:blogspot': 0.64; 'cut': 0.71; 'received:at': 0.71; 'url:11': 0.71; 'demand': 0.96 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1085) Subject: Re: Lazy Attribute From: "Stefan H. Holek" In-Reply-To: Date: Fri, 16 Nov 2012 11:41:50 +0100 Content-Transfer-Encoding: quoted-printable References: To: python-list X-Mailer: Apple Mail (2.1085) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353063984 news.xs4all.nl 6868 [2001:888:2000:d::a6]:44223 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33430 On 15.11.2012, at 20:33, Andriy Kornatskyy wrote: > A lazy attribute is an attribute that is calculated on demand and only = once. >=20 > The post below shows how you can use lazy attribute in your Python = class: >=20 > http://mindref.blogspot.com/2012/11/python-lazy-attribute.html >=20 > 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 --=20 Stefan H. Holek stefan@epy.co.at