> If there is a general agreement about what to do to wrap a decorator, > why no use the following syntax > > @decorator > def trace(f): I've thought of that, and it is tempting. However, it does not give you any clue what the decorator actually *does*, that's why I don't like it. People would declare any decorator using @decorator, without thinking whether they actually need to make that declaration. By design, any function (or, any callable for that matter) can serve as a decorator, so having a declaration for it might actually add confusion. Regards, Martin
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