[Python-Dev] Re: Call for defense of @decorators

Christian Tismer tismer at stackless.com
Fri Aug 6 19:15:04 CEST 2004


Guido van Rossum wrote:

>>So I spent a little time futzing with python-mode and some of my
>>decorator code, to try some alternative leading characters.  Of the ones
>>that cannot be used in valid Python code today (i.e. no backward
>>compatibility issues), I tried ':', '/', '=', '*', and '|'.
> 
> 
> If the community can rally behind one of these, I think that would be
> acceptable.  They all seem arbitrary, but so is the choice of '@'. :-)

Not that I want to put more oil into this never ending
story, but I think a few messages ago you mentioned that
the primary purpose of all the decorator syntax effort
is to get the

foo = classmethod(foo)

into the right place, not after but before the definition.

Dunno if this was mentioned before, but why not simply do that?
Move the statement right before the def and provide a way
that this gets recognized correctly.

No syntax change, just the convenience people asked for.

Well, just an idea -- chris

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/



More information about the Python-Dev mailing list