At 05:53 PM 6/25/04 -0500, Contempt for Meatheads wrote: >IMHO, making decorators functions is a bad idea. Decorators are metadata >about the function to which they refer. Using the same syntax for >decorators as for functions conceptually weakens this distinction and >encourages misuse of decorators, even to the point of potentially >encouraging (or implying) side-effects as a result of decoration. Side-effects are desired by various current users of decorators, so whether this will "encourage" them is moot. Further, those uses often suggest that "metadata" is far too narrow of a word to encompass the desired uses of decorators. Last, keep in mind that there is nothing stopping people today from doing whatever they want with functions *anyway*, in every version of Python I've ever used (back to 1.4): def foo(...): ... do_something_with(foo) So, again, the idea that this somehow becomes a bad thing when it goes at the top of the function definition -- where it should be more visible to the reader that it's taking place -- seems a bit odd to me.
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