[Python-Dev] Re: decorators and 2.4
Jack Jansen
Jack.Jansen at cwi.nl
Fri Jun 25 18:25:40 EDT 2004
We've now had so many suggestions for decorators that I don't remember
whether the following one was suggested already (and shot down, causing
the ill-informed maker of the suggestion to go hide under a stone for
weeks:-), so here goes:
def:
objc_signature('i@:if')
as methodWithInt_andFloat_(self, intarg, floatarg):
return intarg + int(floatarg)
The use of "as" here is gratuitous, because everyone seems to use that
as the only semi-keyword in existence.
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
More information about the Python-Dev
mailing list