Barry Warsaw wrote: > On Fri, 2004-08-13 at 19:24, Bob Ippolito wrote: > > >>My only problem with this syntax is that I expect the common cases >>(mine, anyway) to be zero or one decorators per function, so the extra >>block and indent seems a bit excessive compared to the current >>@prefix-symbol-decorator proposal(s). It is, of course, far better >>than typing the function name three times though! :) > > > Same here. It trades one line at the end of the function for two (or > more) before the beginning of the function. > > -0 What about the variant which makes the block optional when there is only one decorator? i.e. decorate: staticmethod def foobar(): pass The other thing I like about this version is that a folding editor like PythonWin can easily compress a decorated definition down to two lines, while leaving it clear that the function *is* decorated. That's not a huge point, though. Cheers, Nick. -- Nick Coghlan | Eugene, Oregon Email: ncoghlan at email.com | USA
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