On Friday 25 June 2004 04:09 pm, Phillip J. Eby wrote: > * Whether to have a 'decorate' function at all, or whether it's better to > just list specialized decorator objects/functions (I generally favor the > latter, since 'decorate' is IMO a dead chicken that hasn't appeared in any > widely-supported syntax proposals to date). Ooohh... time for some fun! Some proposals have included "as". Since "as" isn't really a keyword, how about: from decorate import decorate as as as(classmethod) def myAlternateConstructor(...): # make something interesting: return 42 Too bad this is ugly for the simple attribute decorator: as(spam="fidget") def foo(...): send_fred_more_spam_please() -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Zope Corporation
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