Poll - Vote here for "list-after-def" (was Decorator syntax)

Jean Brouwers JBrouwersAtProphICyDotCom at no.spam.net
Fri Aug 6 08:11:33 CEST 2004


The "list-after-def" is my preference as well, more than +1.  It
matches existing Python syntax by using a list (or tuple?) notation,
the list of keywords can span one or multiple lines and it can easily
be extended with additional keywords as the need arises in the future.

Apart from being non-Pythonic, my objection against the @ proposal is
that it can easily be confused with comments like the (Java) doc-like
notations.

I am not qualfied to judge backward possible compatibility issues.

/Jean Brouwers
 


In article <6LWdnZCpvI7Ico_cRVn-hw at giganews.com>, Istvan Albert
<ialbert at mailblocks.com> wrote:

> Paul McGuire wrote:
> 
>  > Please reconsider the "def f() [classmethod]:" construct.  Instead of
>  > invoking a special punctuation character, it uses context and placement,
>  > with familiar old []'s, to infuse the declaration of a function with
>  > special
>  > characteristics.  If this causes def lines to run longer than one line,
>  > perhaps the same rule that allows an unmatched "(" to carry over multiple
>  > lines without requiring "\" continuation markers could be used for
>  > unmatched
>  > "["s, as in:
>  >
>  > def f() [ staticmethod,
>  >     synchronized,
>  >     alphabetized,
>  >     supersized,
>  >     returns('d') ]:
> 
> Well said!
> 
> Reading the posts here and in the python-dev I've counted
> the following votes for it (I'm sure that there were a lot
> more but it is awfully hard to keep up with the posts
> on the topic).
> 
> Voting for the "list-after-def" syntax as shown above:
> 
> Peter Hansen <peter at engcorp.com>
> AdSR <artur_spruce at yahoo.com>
> Paul McGuire <ptmcg at austin.rr._bogus_.com>m
> Phillip J. Eby pje at telecommunity.com
> C. Barnes <connellybarnes at yahoo.com>
> Aahz aahz at pythoncraft.com
> Skip Montanaro skip at pobox.com
> Bill Janssen janssen at parc.com
> Istvan Albert ialbert at mailblocks.com
> 
> I have the feeling that this always was and still is
> the favorite.
> 
> Ladies and Gents, start your engines and rally around
> this syntax (if you prefer it of course) so that there
> is evidence that it should be taken as a serious candidate.
> 
> Istvan.
>



More information about the Python-list mailing list