An object is an instance (or not)?

alex23 wuwei23 at gmail.com
Tue Jan 27 23:47:56 EST 2015


On 28/01/2015 10:24 AM, Mario Figueiredo wrote:
> In other words, the object know as "Sub class" is not an instance
> object. True, it is an instance of the object 'type'.

     >>> class Foo:
     ...     pass
     ...
     >>> isinstance(Foo, type)
     True
     >>> isinstance(Foo, object)
     True

A class is an object that is an instance of the class type. I'm still 
failing to see what distinction you're trying to make here.



More information about the Python-list mailing list