Commit 636688d4 authored by Guido van Rossum's avatar Guido van Rossum

Improve the message about metatype/metaclass conflicts.

parent f297bd19
...@@ -1580,7 +1580,10 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) ...@@ -1580,7 +1580,10 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
continue; continue;
} }
PyErr_SetString(PyExc_TypeError, 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; return NULL;
} }
if (winner != metatype) { if (winner != metatype) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment