A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/043630.html below:

[Python-Dev] method decorators (PEP 318)

[Python-Dev] method decorators (PEP 318) [Python-Dev] method decorators (PEP 318)Dave Harrison dave at nullcube.com
Sun Mar 28 22:16:52 EST 2004
> If we were designing Python 3.0 here, I would probably suggest the
> following syntax for classmethods:
> 
>   def foo(class cls, x, y):
>     ...
> 
> and wouldn't bother with staticmethods at all. How often do you
> actually need a staticmethod in particular and *not* a classmethod?

It's quite useful to be able to develop, essentially stateless, static
method utility libraries that dont need to be class based.  Why create
an object if you simply don't need one ?

If this was an option, there would have to be a way to use it without
the class element, or at least with there being a keyword to use which
allowed the class element to be ignored.

-- 
Dave Harrison
Nullcube
dave at nullcube.com
http://www.nullcube.com

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