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

[Python-Dev] PEP 318: Decorators last before colon

[Python-Dev] PEP 318: Decorators last before colonAndrew Bennetts andrew-pythondev at puzzling.org
Tue Mar 30 17:27:19 EST 2004
On Tue, Mar 30, 2004 at 01:21:18PM -0800, Guido van Rossum wrote:
> > Another possibility that has been suggested is
> > 
> > [decorator] 
> > def func(arg, arg):
> 
> And one that I currently favor.  I'm out of bandwidth to participate
> on a msg-by-msg basis, but perhaps folks can see if they can come to
> terms with this solution?

The most obvious issues I see with this is are that:
  - grepping for "def func" won't show any sign that its decorated, and 
  - it looks like normal syntax, so it looks like expressions should
    work, e.g.

        [decorator1] + [decorator2]
        def func(arg, arg):

    or even:

        get_std_decorators()   # Returns a list
        def func(arg, arg):
        
    I'm pretty sure this isn't the intention, though.  I can imagine some
    posts to comp.lang.python asking how to do the above...
  
Neither of these are fatal flaws, but I think I still prefer:

    def func(args) [decorator]:

-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