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

[Python-Dev] Another approach to decorators.

[Python-Dev] Another approach to decorators. [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

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