An object is an instance (or not)?

Rustom Mody rustompmody at gmail.com
Wed Jan 28 06:23:06 CET 2015


On Wednesday, January 28, 2015 at 10:18:07 AM UTC+5:30, alex23 wrote:
> 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.

Confusion is not disallowed is it ;-)
Maybe some diagrams will help. Something like
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.50.631&rep=rep1&type=pdf
pic on page 7 particularly the distinction between the arrows and the dotted arrows



More information about the Python-list mailing list