[Python-Dev] Another approach to decorators.

Michel Pelletier michel at dialnetwork.com
Wed Aug 11 23:28:02 CEST 2004


On Wed, 11 Aug 2004 14:23:54 -0700
Michel Pelletier <michel at dialnetwork.com> wrote:

> 
> Put more than one of them in the same decorate block:
> 
> class ...
> 
>   decorate staticmethod, locksFile(arg1):
> 
>     def meth1(...)
>       ...
> 
>     def meth2(...)
>       ...

Oh, and also for many decorators that look better spanning several
lines, use the same syntax proposed for multi-line imports:

class ...

  decorate (staticmethod, 
            blah,
            blah,
            locksFile(arg1)):

    def meth1(...)
      ...

    def meth2(...)
      ...

-Michel


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