classification
Title: Inconsistency in Programming FAQ
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, georg.brandl, gregory_p, loewis
Priority: normal Keywords:

Created on 2006-02-01 20:41 by gregory_p, last changed 2007-08-23 21:32 by georg.brandl. This issue is now closed.

Messages (3)
msg27406 - (view) Author: Gregory Petrosyan (gregory_p) Date: 2006-02-01 20:41
http://python.org/doc/faq/programming.html

1.6.8   How do I create static class data and static
class methods?
...
Static methods are possible when you're using new-style
classes:

class C:
    def static(arg1, arg2, arg3):
        # No 'self' parameter!
        ...
    static = staticmethod(static)

- Shouldn't it look like class C(object)?
- it would be nice to mention decorators here
msg27407 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-02-04 10:41
Logged In: YES 
user_id=21627

Did you try it out? It works. The comment "new-style
classes" is misleading - what it really should say is that
you need a Python version that has staticmethod.

Andrew, this is your text: would you like to correct it?
msg55222 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-23 21:32
Fixed in my pydotorg tree, will commit ASAP.
History
Date User Action Args
2007-08-23 21:32:01georg.brandlsetstatus: open -> closed
nosy: + georg.brandl
resolution: fixed
messages: + msg55222
2006-02-01 20:41:03gregory_pcreate