PEP 318, a different approach
I had a strange idea for decorator syntax. def.classmethod func(cls,...): Multiple decorators are going to need the usual [] thing (or the current clumsy notation), but the strange thought is allowing def.iter so one could be more explicit about defining iterator functions w/out adding a keyword. Sorry to beat that dead horse. Back to the real notation. -- Russell P.S. one could imagine allowing these, as well,, but I can't imagine users typing them: def.func def.instancemethod
I had a strange idea for decorator syntax.
def.classmethod func(cls,...):
This would violate the 'greppability' requirement. It's too nice to have the name always be the token immediately following 'def' to allow anything in between the two. Basically, the only two positions that are still in the race are before the def, and between the argument list and the colon. --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (2)
-
Guido van Rossum
-
Russell E. Owen