From 636688d470e4df7220e7f541a495155077cc0353 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 23 Apr 2003 12:07:22 +0000 Subject: [PATCH] Improve the message about metatype/metaclass conflicts. --- Objects/typeobject.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) { -- 2.50.1