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/2004-August/047413.html below:

[Python-Dev] Re: Re: Call for defense of @decorators

[Python-Dev] Re: Re: Call for defense of @decoratorsBob Ippolito bob at redivi.com
Mon Aug 9 15:33:06 CEST 2004
On Aug 9, 2004, at 9:02 AM, Simon Percivall wrote:

> On 2004-08-09, at 12.38, Walter Dörwald wrote:
>> I can't understand why we can't have a new keyword for decorators.
>> If I remember correctly the introduction of yield didn't result
>> in such a public outcry. We'd have to change our programs once
>> if a variable names collides with the new keyword, but that's better
>> than having to look at @s for the rest of our Python days.
>>
>> So how about:
>>
>> make classmethod
>> def foo(cls, bar):
>>    ...
>
> I think "adorn" would make a better keyword in that case, as in
> "adorn with" this decorator the method foo.

I don't think that's appropriate at all.  Most decorators are 
transformations that change the function object into something else 
entirely, most likely by wrapping it but quite possibly not.

I think the idea of adding a new keyword has already been dismissed, 
though.

-bob
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