Everything is an object in python - object class and type class
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Wed Jun 3 04:24:45 EDT 2015
On Wednesday 03 June 2015 08:33, Marko Rauhamaa wrote:
> Grant Edwards <invalid at invalid.invalid>:
>
>> On 2015-06-02, Ian Kelly <ian.g.kelly at gmail.com> wrote:
>>> Accepting for the sake of argument that "something to be subclassed"
>>> is a reasonable definition of object,
>>
>> Huh? You can't subclass an object. You can subclass a Class.
>
> More to the point: you don't need classes for objects -- even in the
> deepest OOP sense.
That part is true.
> In Python, classes are little more than constructor functions.
But that's not.
Classes give you an inheritance hierarchy. They also hold shared state, and
behaviour for the instances.
--
Steve
More information about the Python-list
mailing list