mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Improve the message about metatype/metaclass conflicts.
This commit is contained in:
parent
f297bd1937
commit
636688d470
1 changed files with 4 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue