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

[Python-Dev] Re: Decorators after 'def' should be reconsidered

[Python-Dev] Re: Decorators after 'def' should be reconsidered [Python-Dev] Re: Decorators after 'def' should be reconsideredSkip Montanaro skip at pobox.com
Thu Aug 12 21:14:35 CEST 2004
    Laurence> I must say I like this idea a lot. It seems much more in
    Laurence> keeping with the rest of the python block structure. You could
    Laurence> even think of decorators as bullet points. Now if only someone
    Laurence> hadn't already found a use for '*' character...

I think '*' is syntactically available for this use.  It's not used as a
unary operator I don't believe.  The *args thing isn't available in the
context where decorators would be used.

That also has the nice side effect of turning @ back over to tools like leo
and ipython.  Unlike '|' it's not likely to be mistaken for other commonly
used characters.  Also, a unary '*' or '**' already have some special
meaning when used in and around function definitions, so seeing

    *deco
    def func(...):
        ...

or

    def func(...):
        *deco
        ...

might be a small hint to readers of the code that deco is somehow involved
in the function's definition.

Skip
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