J2 proposal: keyword
Anthony Baxter
anthonybaxter at gmail.com
Mon Aug 23 05:03:03 EDT 2004
On Mon, 23 Aug 2004 01:36:31 -0700, David Pokorny
<davebrok at soda.csua.berkeley.edu> wrote:
> using:
> staticmethod synchronized memoize
> def bar(foo):
> "To colon or not to colon? Def is the question."
> pass
>
> is easy on the eye while
>
> using:
> staticmethod
> synchronized
> memoize
> def bar(foo):
> "english teachers will call you on putting two colons in one sentence"
> pass
The problem is that
using:
staticmethod accepts(int, str) returns(str) published(True)
def bar(count, input):
return input * count
looks worse (imo) than
using:
staticmethod
accepts(int, str)
returns(str)
published(True)
def bar(count, input):
return input * count
I suspect this sort of decorator usage (more complex decorators) will
become more common over time, as new and interesting patterns are
developed once 2.4 is final.
(Guido's comment on the original @syntax being limited to one-per-line
was that it was a "gut feeling" thing.)
More information about the Python-list
mailing list