> Here's a brief test for a syntax-change-less implementation of this > feature, not as complete as test_decorators, but a good start, I believe: [fast forward to syntax example] > decorate(staticmethod) > def bar(x): > print x > > decorate(classmethod) > def baz(cls, y): > print cls, y I'm speechless. If the ambiguous [classmethod] def foo(x): ... is rejected because it doesn't look like it does something to foo, how come there's suddenly a crop of solutions that have the same problem being proposed? What you write looks like a call to the function decorate(), followed by a function method definition. The "action-at-a-distance" that is presumed by the decorate() call is difficult to explain and a precedent for other worse hacks. Its only point in favor seems to be that it doesn't use '@'. --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