An object is an instance (or not)?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Jan 28 10:21:08 CET 2015


random832 at fastmail.us wrote:

> 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().)


Yes, that's exactly what Mario asked for in the original thread that started 
this. Sadly Python cannot do this.

But the docs could consistently use "class" or "type" to refer to classes 
and types (in Python 3, they are the same thing), and "instance" to refer to 
instances which are not classes, and "object" to refer to both.

And then I would be sooooooo happyyyyyy :-)


-- 
Steve




More information about the Python-list mailing list