diff options
| author | Guido van Rossum <guido@python.org> | 2003-04-23 12:07:22 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2003-04-23 12:07:22 +0000 |
| commit | 636688d470e4df7220e7f541a495155077cc0353 (patch) | |
| tree | d57b7b009ecc92b04317edc623d452a6de5fb035 /Objects/typeobject.c | |
| parent | f297bd1937f1fb73c7f734f6410e294da8dad12d (diff) | |
| download | cpython-git-636688d470e4df7220e7f541a495155077cc0353.tar.gz | |
Improve the message about metatype/metaclass conflicts.
Diffstat (limited to 'Objects/typeobject.c')
| -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 1bfda32127..cf7dd3b3e9 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) { |
