[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

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant