Decorator syntax
Istvan Albert
ialbert at mailblocks.com
Thu Aug 5 13:35:26 EDT 2004
Christopher T King wrote:
> Languages with support
> for these things already have a clear, consice way of specifying these
> things:
>
> def classmethod foo(self):
> pass
>
> Why can't we do the same with Python? The syntax doesn't have to
> support user constructs (indeed, it shouldn't), and it doesn't have to
exactly my thoughts,
but then someone comes along and vehemently argues
how this will break Emacs or Jedit and on top of that
it won't allow you to do some *really cool* stuff, like
multi-decorations for a truly pythonic iteration over
the AccuWeather 10 day forecast datadump.
> Compare to the current state of affairs:
>@partializer(5)
>@make_my_function_awesome
>@author('Chris King')
>@accepts(int,int,int)
>@classmethod
>def foo(self,a,b,c):
> """Returns a+b*c."""
>
> return a+b*c
Yuck! Down with them funny symbols!
i.
More information about the Python-list
mailing list