type() new style class instance says "class", not "ObjectType"

Erno Kuusela erno-news at erno.iki.fi
Wed Apr 10 22:23:55 EDT 2002


In article <3cb4bd45$1_1 at goliath.newsgroups.com>, "Brad Clements"
<bkc at Murkworks.com> writes:

| Could someone explain this to me.
| Lots of code does  type(x) in [InstanceType]

| One might imagine that to support new style classes, this would be changed
| to:

| type(x) in [InstanceType,ObjectType]

it is not a very useful contruct, since everything in python is an
object.

i suspect you have not fully grokked the idea of the 2.2 object
system changes.

the whole idea is to remove the distinction between "types" and
"classes".

  -- erno



More information about the Python-list mailing list