A decorator syntax not yet mentioned (I think!)

Mark Bottjer mark_bottjer at hotmail.com
Fri Aug 13 02:13:53 CEST 2004


Michael Sparks wrote:
> On Thu, 12 Aug 2004, Mark Bottjer wrote:
>>class C:
>>   def c(self):
>>     meta: #declare, decorate, transform, fubar, whatever...
>>       staticmethod
>>       doc('Doc.')
>>     pass
> 
> FWIW, I _personally_ prefer this approach, and the reason I implemented J2
> was solely because I went a) "oooh", b) it looks like it has the same
> advantages as the @pies c) the number of times it's been pointed out that
> syntaxes with decorators inside the function won't go anywhere, d) The
> wiki page said (sorta) that it couldn't be  done.

Just out of curiosity, how hard do you think it would be to implement 
this syntax? I know there's not much point, but just for giggles...

   -- Mark



More information about the Python-list mailing list