On Jul 20, 10:53 pm, a...@pythoncraft.com (Aahz) wrote: > In article <373d6c69-6965-4a88-bdd2-8028ef850...@k6g2000yqn.googlegroups.com>, > > Hyuga <hyugaricd...@gmail.com> wrote: > > >Regardless, Nicolas's example can be applied to the class too: > > >>>> class Foo(object): > > pass > > >>>> hash(Foo) > >11443104 > >>>> id(Foo) > >11443104 > > >class objects are just objects of type 'type'. > > Not quite. They certainly default that way, but changing the metaclass > changes a class's type:: > > class M(type): > pass > > class C(object): > pass > > class C2(object): > __metaclass__ = M > > print type(C) > print type(C2)
Well, okay, you got me there. But the OP wasn't asking about classes with different metaclasses. And besides, type(type(C2)) is still type ;) -- http://mail.python.org/mailman/listinfo/python-list