[Python-ideas] Decorator syntax restriction

geremy condra debatem1 at gmail.com
Wed Oct 7 17:06:46 CEST 2009

On Fri, Oct 2, 2009 at 9:40 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:

> Paul Moore wrote:
>  @(a['b'].fns[1])(1,2,{3,4})
>> def something():
>> I contend that's clearly "line noise".
> But there's nothing to stop you from writing
>  f = (a['b'].fns[1])(1,2,{3,4})
>  @f
>  def something():
> If the first version is unreadable, the second one isn't going
> to be significantly better.
> --
> Greg

I'm +0 on the whole thing, but this to me is the strongest
argument advanced thus far. Seems silly to make people
run otherwise reasonable, readable code through the
manglifier in order to satisfy a rule that doesn't work

Geremy Condra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20091007/350ae87c/attachment.html>

More information about the Python-ideas mailing list