Decorator keyword

David Fraser davidf at
Fri Aug 6 11:53:29 CEST 2004

Anthony Baxter wrote:
> On 5 Aug 2004 17:17:39 -0700, Steven Bethard <steven.bethard at> wrote:
>>I was just going to let this go because I thought it had been shut
>>down, but as it seems to have been reopened, I'd love to see something
>>with classmethod
>>with returns(int)
>>def func(*args, **kwds):
>>    return 1
> "with" is a non-starter - there's already other plans to use with for other
> things, at some distant point. Also, if we're to have a new keyword, it
> should be _much_ more obvious than 'with'.

Any pointers to info on other plans for with?
suggestions: declare

declare classmethod
declare returns(int)
def func(*args, **kwds):
     return 1

Other ideas would be "decorate", but this doesn't really seem to make 
sense (perhaps suggesting that decorators isn't the best name for them 
:-)) or "wrap" (because they literally wrap the function, but again that 
doesn't seem intuitive.


More information about the Python-list mailing list