Improve the message about metatype/metaclass conflicts.

This commit is contained in:
Guido van Rossum 2003-04-23 12:07:22 +00:00
parent f297bd1937
commit 636688d470
1 changed files with 4 additions and 1 deletions

View File

@ -1580,7 +1580,10 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
continue;
}
PyErr_SetString(PyExc_TypeError,
"metatype conflict among bases");
"metaclass conflict: "
"the metaclass of a derived class "
"must be a (non-strict) subclass "
"of the metaclasses of all its bases");
return NULL;
}
if (winner != metatype) {