On Feb 26, 2004, at 1:00 PM, Christian Tismer wrote: > Bob Ippolito wrote: > >>> class klass: >>> foo = decorator >>> def foo():... >>> >>> baz = decorator1, decorator2 >>> def baz(): ... >>> >>> The simple idea is to change semantics that if a name already >>> exists before a def, it is checked whether it is a decorator >>> function or a tuple of these, and if so, they are called. > >> That's too magical for me, and it means I have to spell out the name >> of the function (which may be quite long) twice.. which is better >> than three times, but not as good as once. > > Or even simpler, just push them as special constants on top of the def: > > class klass: > classmethod > def foo():... > > not too serious, but I hate new syntax... Try writing large portions of code that are just begging for this new syntax! Try writing large portions of code that are just begging for this new syntax! Try writing large portions of code that are just begging for this new syntax! (three times, to emphasize the number of times that I have to type the name of each function when using a descriptor) (three times, to emphasize the number of times that I have to type the name of each function when using a descriptor) (three times, to emphasize the number of times that I have to type the name of each function when using a descriptor) The special pushed constants thing is just a little too weird for me as well :) -bob
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