Determining the metaclass

casebash walkraft at
Sun Aug 30 02:12:45 CEST 2009

Hi all,

I cannot determine if a class is an instance of a particular
metaclass. Here is my best attempt

>>> class tmp(type):
...     pass
>>> def c(metaclass=tmp):
...     pass
>>> isinstance(c, tmp)
>>> isinstance(c.__class__, tmp)

Can anyone explain why this fails?

Thanks very much,


More information about the Python-list mailing list