static python classes ?

Diez B. Roggisch deets at
Tue Jun 19 15:46:16 CEST 2007

Tom Gur wrote:

> Hi,
> I'm new to python, and I can't seem to find in the docs how to create
> the python equivalent of what's called in most OOP languages "static
> classes", can you give me a hint ?

With other OOP languages you mean Java. Which does have static methods
because they lack the notion of a function by its own, so the shoehorned
them into their "everything is inside a class"-paradigm.

Forget about that. As well as getters and setters, interfaces and the like.

Just use a module-level function. 


More information about the Python-list mailing list