A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/047498.html below:

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

[Python-Dev] request: add keywords for static and class methods only [related to decorators discussion]Doug Holton d.holton at vanderbilt.edu
Fri Aug 6 19:13:16 CEST 2004
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.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4