> 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
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