From: Guido van Rossum Date: Wed, 23 Apr 2003 12:07:22 +0000 (+0000) Subject: Improve the message about metatype/metaclass conflicts. X-Git-Tag: v2.3c1~1069 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=636688d470e4df7220e7f541a495155077cc0353;p=thirdparty%2FPython%2Fcpython.git Improve the message about metatype/metaclass conflicts. --- diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 1bfda3212720..cf7dd3b3e9e1 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) {