On 17 Sep 2005 02:04:39 -0700 "Simon Percivall" <[EMAIL PROTECTED]> wrote:
> Have you read the "Metaclasses" part of "Unifying types and classes in > Python 2.2"? (http://www.python.org/2.2.3/descrintro.html#metaclasses) Yes, I read. Have you read and understood my message ? :) A class B, subclass of class A, with a metaclass M_A should have M_A or a subclass of it as metaclass. If you try with anything else, you get a TypeError exception as expected. OK. But if you try with 'type', nothing happens. Python 2.4.1 (#1, Sep 16 2005, 17:47:47) [GCC 3.3.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class M_A(type): pass ... >>> class A: __metaclass__ = M_A ... >>> class B(A): __metaclass__ = type ... >>> B.__class__ <class '__main__.M_A'> >>> B.__metaclass__ <type 'type'> Regards, -- Pedro Werneck -- http://mail.python.org/mailman/listinfo/python-list