Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info>: > On Wednesday 03 June 2015 08:33, Marko Rauhamaa wrote: >> In Python, classes are little more than constructor functions. > > [...] > > Classes give you an inheritance hierarchy.
That's encapsulated in the constructor. From the class user's point of view, it doesn't matter if the object derives its behavior through inheritance or through reimplementation. From the class implementor's point of view, inheritance is syntactic sugar. > They also hold shared state, and behaviour for the instances. That's the "little more" I was referring to. It is Python esoterics that can safely be ignored. Marko -- https://mail.python.org/mailman/listinfo/python-list