Duncan Booth <[EMAIL PROTECTED]> writes: > In fact, thinking about it a bit more, I think that if you did have > another metaclass which is its own metaclass then the class cannot > subclass 'object'.
You could if the metaclass of your metaclass inherited from 'type'. Then your types could still be binary-compatible with Python types, and your objects with 'object'. It's difficult to envision what you'd gain with a custom meta-meta-class, but it seems possible: >>> class MetaMeta(type): pass ... >>> class Meta(type): ... __metaclass__ = MetaMeta ... >>> class Foo(object): ... __metaclass__ = Meta ... >>> f = Foo() >>> f <__main__.Foo object at 0xb7d27bec> >>> type(f) <class '__main__.Foo'> >>> type(type(f)) <class '__main__.Meta'> >>> type(type(type(f))) <class '__main__.MetaMeta'> >>> isinstance(f, object) True -- http://mail.python.org/mailman/listinfo/python-list