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-October/057437.html below:

[Python-Dev] Defining properties - a use case for class decorators?

[Python-Dev] Defining properties - a use case for class decorators? [Python-Dev] Defining properties - a use case for class decorators?Nick Coghlan ncoghlan at gmail.com
Wed Oct 19 11:25:05 CEST 2005
Josiah Carlson wrote:
>> Another option would be to allow attribute reference targets when binding 
>> function names:
> 
> *shivers at the proposal*  That's scary.  It took me a few minutes just
> to figure out what the heck that was supposed to do.

Yeah, I think it's a concept with many, many more downsides than upsides. A 
"given" or "where" clause based solution would be far easier to read:

   x.get = f given:
       def f(): pass

A given clause has its own problems though (the out-of-order execution it 
involves being the one which seems to raise the most hackles).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.blogspot.com
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