A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/043870.html below:

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

[Python-Dev] Re: PEP 318: Decorators last before colon [Python-Dev] Re: PEP 318: Decorators last before colonPhillip J. Eby pje at telecommunity.com
Wed Mar 31 22:39:05 EST 2004
At 10:19 PM 3/31/04 -0500, Terry Reedy wrote:

>"Mike Thompson" <mike.spam.filter at day8.com.au> wrote in message
>news:c4fk3i$ujb$1 at sea.gmane.org...
> >      as: [classmethod]
> >      def func(args)
>
>I think I like this better than the bare list as a prefix.  as: suites
>could be explained as an optional prefix suite for functions just as else:
>suites are optional suffix suites for if/while/for.   Hmmm...

'as' is not currently a keyword, and making it so would break any programs 
that use it as a name.

On the bright side, if it *were* made a keyword, then this would be possible:

as [classmethod] def func(*args):
     pass

Really, of the current "before the def" proposals, I think I like Samuele's:

*[classmethod]
def func(*args):
     pass

approach the best.  The '*' seems to say "special note, pay attention".  :)


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