[Python-Dev] Metatype conflict among bases?
David Abrahams
dave@boost-consulting.com
Tue, 22 Apr 2003 17:58:23 -0400
Consider:
class A(object):
class __metaclass__(type):
pass
class B(A): # TypeError: metatype conflict among bases
class __metaclass__(type):
pass
Now that's a weird error message at least! There's only one base (A),
and I'm telling Python explicitly to use the nested __metaclass__
instead of A's __metaclass__!
Should I not be surprised that Python won't let me set the metatype
explicitly?
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com