Static class methods

Sven Peters svpeters at
Mon Mar 5 01:06:06 CET 2001

Chris Armstrong wrote:

> I have trouble believing that something like this is really needed.
> Could you give a real-world example?
Factoty methods, for getting objects created earlier and no longer needed, 
yet expensive to create e.g. database connection pooling.
Sure, you can place this elsewhere(module level or other objects).
You CAN have class methods:
def bert:
        print "Bert"
class.method = bert

... but no language support to create them as easy as instance methods

Sven Peters

More information about the Python-list mailing list