An object is an instance (or not)?

random832 at fastmail.us random832 at fastmail.us
Wed Jan 28 00:44:47 EST 2015


On Tue, Jan 27, 2015, at 23:47, 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.

I think his objection is to the use of the phrase "'Sub' object" to
refer only to instances of the Sub type, when 'Sub' is the name of the
type object itself and therefore (he thinks) "'Sub' object" should refer
to it instead. (I can only assume he wants "'x' object" for x = Sub().)



More information about the Python-list mailing list