In article <[email protected]>,
Hyuga <[email protected]> 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)
--
Aahz ([email protected]) <*> http://www.pythoncraft.com/
"The volume of a pizza of thickness 'a' and radius 'z' is
given by pi*z*z*a"
--
http://mail.python.org/mailman/listinfo/python-list