Alternative decorator syntax - POLL RESULTS SO FAR - ARE WE DONE?
Peter Hansen
peter at engcorp.com
Sun Aug 22 08:34:41 EDT 2004
John Roth wrote:
> Now that I've had a chance to look at the syntax, you can count
> me mildly in favor of J2. (I haven't voted yet.) It's an extra line,
> but I think the explicitness outweighs the vertical space it
> takes up.
Although I'm not sure it was implemented this way, I
believe there may be an intent to support the usual
sort of one-line version as this (using an alternate
keyword instead of "decorate" which now seems doomed):
using: staticmethod
def foo(bar, baz):
pass
That makes it no extra lines, but still explicit and Pythonic
in nature.
(Michael, was that how you implemented the latest?)
-Peter
More information about the Python-list
mailing list