tweaking @decorator syntax

Arthur ajsiegel at optonline.com
Fri Aug 6 09:08:05 EDT 2004


On 06 Aug 2004 11:53:29 +0200, Hallvard B Furuseth
<h.b.furuseth at usit.uio.no> wrote:
>
>Still, if we do get a new way to indicate that something is parsed
>differently, then a special character like @ would be good for that.
>'@some-directive' in general could be a statement which the compiler
>reacts to in some way, and decorators could be a special case:
>  @decorator <decorator_name>
>instead of just
>  @<decorator_name>


It's mildly interesting, and perhaps slightly relevant, that
'@some-directive' fools my news reader into thinking there is a email
address reference involved.

'@' seeming a strange choice for decorator syntax perhaps in part
because it already has a much more pandemic meaning, and in that
meaning the thing that is in fact '@'  the address precedes the
symbol.  The Python syntax will be the opposite. 

Though I find the arguments about viusal layout/ indentation the more
compelling, and don't think a change of symbol or the introduction of
a keyword in substitution for '@' will help with that more substantial
issue.

That being said, as a founding memeber of CLA (Chicken Littles
Anonymous), it is therapeutic to predict publically that Python will
survive the @ decorator syntax, should it stick.

Art



More information about the Python-list mailing list