An object is an instance (or not)?
steve+comp.lang.python at pearwood.info
Wed Jan 28 10:17:33 CET 2015
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'.
Can you not see the contradiction there?
The object known as 42 is not an instance object. True, it is an instance of
the object "int".
Er, then surely that means that 42 *is* an instance object?
I agree that in *common situations*, it is useful to pretend that Python is
like Java, and draw a distinction between classes and instances. I don't
think it is useful to deny that classes are instances.
The discussion depends on context, in the same way that depending on context
sometimes it is useful to include Homo sapiens in the group "Animals" and
"Sit up straight and stop eating like an animal!"
"Like all animals, human beings rely on the environment for their survival."
More information about the Python-list