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

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

[Python-Dev] Re: Re: Call for defense of @decorators [Python-Dev] Re: Re: Call for defense of @decoratorsAndrew McGregor andrew at indranet.co.nz
Thu Aug 12 03:21:33 CEST 2004
--On Wednesday, 11 August 2004 9:55 a.m. -0500 Skip Montanaro 
<skip at pobox.com> wrote:

>
>     Andrew> Aren't we really trying to recreate def as a multi-line lambda
>     Andrew> that binds when it's in a context that is not expecting a
>     Andrew> function argument in block form?
>
> I suppose you can look at it that way.  The output of a function
> definition plus any decorator applications to it need not be a function
> though.  I posted a simpleminded example of generating a greyscale ramp
> using a decorator.  If I thought about it for more than a few seconds I
> could probably come up with some other examples as well where the output
> wasn't a function.  Some of them might even be useful. ;-)
>
> Skip
>
>

And that's exactly my point: (relatively) big one-time-use functions can be 
really useful, especially if the function definition is somewhat dependant 
on context.

Andrew


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