request: add keywords for static and class methods only [related to decorators discussion]

After reading some posts here and the wiki page discussing the decorators: http://www.python.org/moin/PythonDecorators One idea that some people have suggested is to separate out standard uses for decorators like function metadata, vs. built-in features of python, like static methods and class methods. So I'm suggesting, don't use decorators for static and class methods. Perhaps for 2.5 or whenever, we should add keyword support for built-in features, just like java: These two keywords at least: def static mymethod (arg1, arg2): .... def classmethod mymethod( cls, arg1, arg2 ): .... And then you have to decide if you want to support other java built-in features and keywords like private, protected, public, synchronized. See the bottom of the wiki page for ideas for the long term future that combine these keywords with decorators and other possible features.

On Aug 6, 2004, at 1:13 PM, Doug Holton wrote:
After reading some posts here and the wiki page discussing the decorators: http://www.python.org/moin/PythonDecorators One idea that some people have suggested is to separate out standard uses for decorators like function metadata, vs. built-in features of python, like static methods and class methods.
So I'm suggesting, don't use decorators for static and class methods.
Perhaps for 2.5 or whenever, we should add keyword support for built-in features, just like java:
Now that's a -1 if I've ever seen one. -bob

Doug Holton wrote:
After reading some posts here and the wiki page discussing the decorators: http://www.python.org/moin/PythonDecorators One idea that some people have suggested is to separate out standard uses for decorators like function metadata, vs. built-in features of python, like static methods and class methods.
So I'm suggesting, don't use decorators for static and class methods.
Perhaps for 2.5 or whenever, we should add keyword support for built-in features, just like java:
These two keywords at least:
def static mymethod (arg1, arg2): ....
def classmethod mymethod( cls, arg1, arg2 ): ....
And then you have to decide if you want to support other java built-in features and keywords like private, protected, public, synchronized.
This is in no way meant to be taken personally, but I am going make the understated statement, "hell no", for this. That means -Inf from me. =) We do not need more keywords for just static and class methods. They don't get used enough to warrant that. -Brett
participants (3)
-
Bob Ippolito
-
Brett C.
-
Doug Holton