Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment: What also worries me is the difference between the "class" statement and the type() function.
class M_A(type): def __new__(mcls, name, bases, ns): print('M_A.__new__', mcls, name, bases) return super().__new__(mcls, name, bases, ns) class M_B(M_A): def __new__(mcls, name, bases, ns): print('M_B.__new__', mcls, name, bases) return super().__new__(mcls, name, bases, ns) class A(metaclass=M_A): pass class B(metaclass=M_B): pass class C(A, B): pass D = type('D', (A, B), {}) The construction of C and D won't print the same messages. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1294232> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com