[Python-Dev] Re: Call for defense of @decorators (original) (raw)

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, returnto=None): request = current.request ...

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

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