A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-March/052250.html below:

[Python-Dev] properties with decorators (was: code blocks using

[Python-Dev] properties with decorators (was: code blocks using [Python-Dev] properties with decorators (was: code blocks usingJosiah Carlson jcarlson at uci.edu
Thu Mar 17 20:15:55 CET 2005
Jp Calderone <exarkun at divmod.com> wrote:
> 
> On Thu, 17 Mar 2005 09:01:27 -0800, Josiah Carlson <jcarlson at uci.edu> wrote:
> >
> > Nick Coghlan <ncoghlan at iinet.net.au> wrote:
> > > 
> > > Josiah Carlson wrote:
> > > > 
> > > > [snip]
> > > > 
> > > > I think properties are the most used case where this kind of thing would
> > > > be nice.  Though the only thing that I've ever had a gripe with
> > > > properties is that I didn't like the trailing property() call - which is
> > > > why I wrote a property helper decorator (a use can be seen in [1]).  But
> > > > my needs are small, so maybe this kind of thing isn't sufficient for
> > > > those who write hundreds of properties.
> > > [snip]
> > > 
> > > I'm still trying to decide if the following is an elegant solution to defining 
> > > properties, or a horrible abuse of function decorators:
> > 
> > [snip example]
> > 
> > The only issue is that you are left with a closure afterwards, no big
> > deal, unless you've got hundreds of thousands of examples of this.  I
> > like your method anyways.
> 
>   No closed over variables, actually.  So no closure.

My mistake (caused by a misunderstanding of when closures are not
created, obviously).

 - Josiah

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4