diff options
author | Guido van Rossum <guido@python.org> | 2003-04-23 12:07:22 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-04-23 12:07:22 (GMT) |
commit | 636688d470e4df7220e7f541a495155077cc0353 (patch) | |
tree | d57b7b009ecc92b04317edc623d452a6de5fb035 /Objects | |
parent | f297bd1937f1fb73c7f734f6410e294da8dad12d (diff) | |
download | cpython-636688d470e4df7220e7f541a495155077cc0353.zip cpython-636688d470e4df7220e7f541a495155077cc0353.tar.gz cpython-636688d470e4df7220e7f541a495155077cc0353.tar.bz2 |
Improve the message about metatype/metaclass conflicts.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 1bfda32..cf7dd3b 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -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) { |