An object is an instance (or not)?

Mario Figueiredo marfig at gmail.com
Tue Jan 27 19:24:22 EST 2015


In article <mailman.18192.1422401989.18130.python-list at python.org>, 
ben+python at benfinney.id.au says...
> > > This is why I say that even in Python, where a class is an object,
> > > an object is not always an instance. The language itself forces that
> > > distinction.
> 
> You have not, to my knowledge, shown any object (in Python 2.2 or later)
> which is not an instance of some class. Python objects are always an
> instance of some specific class.

It is true that a class object is an instance of 'type'. But this is a 
special type (can't avoid the pun). A class object is not an instance of 
the type it implements. That is what I mean by an object that isn't an 
instance.

In other words, the object know as "Sub class" is not an instance 
object. True, it is an instance of the object 'type'.



More information about the Python-list mailing list