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

Skip Montanaro skip at pobox.com
Wed Aug 11 16:55:41 CEST 2004


    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



More information about the Python-Dev mailing list

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant