Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.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.045 X-Spam-Evidence: '*H*': 0.91; '*S*': 0.00; 'cached': 0.09; 'to:name :python-list': 0.15; 'value:': 0.16; 'wrote:': 0.17; 'instance': 0.17; 'stefan': 0.17; 'handles': 0.18; 'pass': 0.25; 'header:In- Reply-To:1': 0.25; "d'aprano": 0.29; 'received:192.168.1.3': 0.29; 'steven': 0.29; "i'm": 0.29; 'towards': 0.32; 'to:addr:python- list': 0.33; 'url:org': 0.36; 'charset:us-ascii': 0.36; 'subject:: ': 0.38; 'url:en': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'header:Message- Id:1': 0.62; 'received:at': 0.71 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: <50a6156e$0$29978$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 16 Nov 2012 11:45:32 +0100 Content-Transfer-Encoding: quoted-printable References: <50a6156e$0$29978$c3e8da3$5496439d@news.astraweb.com> 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353062733 news.xs4all.nl 6949 [2001:888:2000:d::a6]:58588 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33428 On 16.11.2012, at 11:29, Steven D'Aprano wrote: > I'm very vaguely leaning towards this as the least-worst solution to=20= > invalidating the cached value: >=20 > refresh(obj, 'attr') # pass the instance and the name This it exactly how lazy handles invalidation. = http://lazy.readthedocs.org/en/latest/ Stefan --=20 Stefan H. Holek stefan@epy.co.at