A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/047078.html below:

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

[Python-Dev] Re: Call for defense of @decorators [Python-Dev] Re: Call for defense of @decoratorsRichie Hindle richie at entrian.com
Fri Aug 6 13:12:31 CEST 2004
[Shalabh]
> An alternative character (as others have suggested)
> might be good too. If so, I found '|' particularly nice :)
> 
>     |paramnames(username='Username', password='Password')
>     |webmethod(username=str, password=str)
>     def login(self, username, password, return_to=None):
>         request = current.request
>         ...

I much prefer this to @decorator.  In addition to the advantages that
Shalabh gives:

 + It doesn't break Leo, IPython, or any other tool that uses @ as a
   special character.

 + The association with pipes makes some sense: "take this thing and pass
   it through that thing to get a modified thing".

Perhaps someone with write access to the Wiki page at
http://www.python.org/moin/PythonDecorators could add this idea there?
It would be a shame if it got lost in the high-volume traffic here on
python-dev.  Unless there's some overwhelming technical reason why reusing
the '|' character isn't possible, of course.

-- 
Richie Hindle
richie at entrian.com

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4