[Python-Dev] Decorators: vertical bar syntax

Chris King colanderman at gmail.com
Sat Aug 7 19:11:04 CEST 2004


On Sat, 07 Aug 2004 00:35:17 -0400, Edward Loper
<edloper at gradient.cis.upenn.edu> wrote:
>      |classmethod
>      |accepts(int, int)
>      |returns(float)
>      def foo(arg1, arg2):
>          ...

Personally, I'd prefer @ over |: | looks too much like ASCII art (like
someone might draw in a multiline comment in C); whereas @ at least
looks like it's doing something.  Though for me, @ brings to mind
preprocessor directives, maybe that's for the best.

>      def foo(arg1, arg2):
>          |classmethod
>          |accepts(int, int)
>          |returns(float)
>          ...

This does look prettier (especially the space version), but it looks
even more like ASCII art.

So for the record, assuming I'm -1 on @, I'm -1.5 on this ;)


More information about the Python-Dev mailing list