static python classes ?

Diez B. Roggisch deets at nospam.web.de
Tue Jun 19 09:46:16 EDT 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. 

diez





More information about the Python-list mailing list