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

[Python-Dev] method decorators (PEP 318)

[Python-Dev] method decorators (PEP 318) [Python-Dev] method decorators (PEP 318)Robert Brewer fumanchu at amor.org
Fri Mar 26 13:36:05 EST 2004
Shane Hathaway wrote:
> It's interesting that this whole discussion is about placing 
> declarations near the "def" statement, rather than after the function 
> body.  It appears to be a surprisingly important detail.
> 
> Tossing out another idea:
> 
>      foobar:
>          author = "Guido van Rossum"
>          deprecated = True
>      def foobar(self, arg):
>          pass
> 
> The declaration block must be followed immediately by a class or def 
> statement.  It looks elegant to me.

Yes, although I bet the parser would have an easier time with a specific
token to mark the block:

    predef foobar:
        author = "Guido van Rossum"
        deprecated = True
    def foobar(self, arg):
        pass

...not that I like "predef", I just couldn't think of a better one
off-hand. ;)


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org

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