Correct type for a simple "bag of attributes" namespace object

Marko Rauhamaa marko at pacujo.net
Sun Aug 3 10:51:10 EDT 2014


Peter Otten <__peter__ at web.de>:

> i. e. you have a per-class and per-instance memory consumption. The
> latter is smaller, so with regards to memory consumption instantiating
> only pays off when there is more than one employee.

I've reached a point where I think classes are a superfluous OO concept.
You only need objects.

Python is close to that reality. The "class" keyword really creates a
function that creates objects, and the objects' class membership is
ignored in ducktyping.

Classes may or may not save RAM, but that is rather a low-brow point of
view toward OO.


Marko



More information about the Python-list mailing list