> >No, you can put multiple decorators on a single line -- you just need a > >newline before the def. From test_decorators.py: > > > > class C(object): > > @funcattrs(abc=1) @staticmethod > > def foo(): return 42 > > > >Probably not good style (but neither is "if cond: stmt" I guess). > > *shudder* > > Can we change this? The positive benefits that the @ syntax *does* > have, seem completely lost by doing this. That's a bit strong, but yes, it would be trivial to change. If that's all that's needed to save @deco, it's a lot easier than ripping the whole thing out... :-) --Guido van Rossum (home page: http://www.python.org/~guido/)
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