Shalabh Chaturvedi wrote: > |paramnames(username='Username', password='Password') > |webmethod(username=str, password=str) > def login(self, username, password, return_to=None): > request = current.request > ... > > |webmethod() > def logout(self, return_to=None): > current.request.session.user = None > return current.request.redirect(return_to or self._q_location) > > Appears accentuated, yet clean, specially for simple/single > decorators. > Gives an appearance that the decorators are 'connected' to the > function. This looks remarkably nice to me for a syntax before the definition. Astoundingly so. I still prefer list-before-colon, but the above would alleviate much of my distate for @ which is that it doesn't look as though the decorators are connected to the definition. Hmm - perhaps a further variation ... |paramnames(username='Username', password='Password') | |webmethod(username=str, password=str) | def login(self, username, password, return_to=None): request = current.request i.e. the decorators must be connected to the def, but you can use some whitespace to make them look better (for decorators with long parameter lists). Would be hell to parse though ... Tim Delaney
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