Everything is an object in python - object class and type class

TheDoctor dreamingforward at gmail.com
Mon Jun 1 21:15:15 EDT 2015


On Monday, June 1, 2015 at 7:33:11 PM UTC-5, Chris Angelico wrote:
> And a type is an
> object too. There is no significant difference here.

Let me make this clearer to you, Chris, because I don't want you to have to suck it too, like the rest of this community.

A type is not an object.  You see it as one, because you are MENTALLY lexing your own code on the screen.  But python does not define a type.  It defines certain primitives, like strings and integers.  But it doesn't define what an OBJECT is.  So you and everyone else are beating around the bush trying to define something that the LANGUAGE ITSELF doesn't define.  So, don't make a claim about it.  

In Python 2.7 type(type) is type (not object), but isinstance(type, object) is true -- so it is ambiguous, even contradictory, in the language.

Boom.  Suck it.

Mark



More information about the Python-list mailing list