[Python-Dev] Decorators: vertical bar syntax

Tim Peters tim.peters at gmail.com
Sat Aug 7 20:25:09 CEST 2004


[Anthony Baxter]
> Lest my previous post saying I could "live with" the
> pipe symbol be misinterpreted, I still prefer @ over |.
> My main reason for preferring the former is that it's
> far more obvious in a page of code (I tried both).

Hmm.  Why would you *want* decorator annotations to be especially
visible on a page of code?  Indentation and blank lines still make
class, method, and function boundaries clear, and that's the important
"page level" structure.  Decorators are details.

> The pipe tends to blend in to a disturbing degree.

Indeed, for me that's a reason to prefer | over @.  BTW, while the PEP
wasn't clear on this point last I looked, I hope it allows for
whitespace after the | (or @, or =, or whatever it is).

> Making it a different colour in an editor also doesn't seem to help
> that much.

Even better <wink>.

> I'm also concerned that we don't make a horrible
> precedent here - that a new language feature is
> changed solely because other tools that were playing
> outside the boundaries of the language will be
> impacted. This would be an utter pain in the arse
> going forward.

Well, this particular language feature has changed every week for most
of a year. If we're at the point where a change actually *helps*
someone, I'm not gonna hold that against it.


More information about the Python-Dev mailing list