Jim> I am hoping to post a new draft of PEP318 soon. Unfortunately, the Jim> solution that currently looks best to me has not been mentioned Jim> before. Jim> I wanted to give a heads up, so that people will be able to read Jim> the rest of the PEP too. (And so that I can change it if everyone Jim> else hates the new syntax.) ... Jim> class Foo: Jim> [transform] from: Jim> def bar(): Jim> pass I honestly don't think this is going to fly. Ignoring the readability factor (it doesn't read right to me), suppose I have a function foo() which is 90 lines long and I don't use Emacs, vim or some other editor with a notion of Python's indentation-based block structure (say, Notepad). Now I decide foo() needs to be transform()ed. It will be tedious and error-prone to have to reindent the entire function just to wedge in the decorator. On the other hand, a decorator syntax which doesn't affect indentation of the class or function is much easier to apply. Skip
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