On 8/3/2014 10:51 AM, Marko Rauhamaa wrote:
Peter Otten <__pete...@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.
The object class is used to implement duck typing. It is the delegation
of operations to class instance methods that makes extensible duck
typing possible.
'a + b' is equivalent to type(a).__add__(a, b)
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list