[Python-ideas] Decorator syntax

Terry Reedy tjreedy at udel.edu
Thu Sep 3 09:28:12 CEST 2009


Georg Brandl wrote:

>    @foo.bar
>    @foo.bar[baz]

To me, this is easier to read (conceptualize), because it simply selects 
a metafunction, than the current

>    @foo.bar(baz)

, which calls a metafunction that creates and returns a metafunction.
So I hope it gets added if not too difficult.

I have some sympathy for Guido's position that anything more complicated 
should be split into two lines. That should be mentioned in the docs 
whether or not @f[i] is added.

tjr




More information about the Python-ideas mailing list