[Python-Dev] Re: Call for defense of @decorators
Richie 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