]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Improve the message about metatype/metaclass conflicts.
authorGuido van Rossum <guido@python.org>
Wed, 23 Apr 2003 12:07:22 +0000 (12:07 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 23 Apr 2003 12:07:22 +0000 (12:07 +0000)
Objects/typeobject.c

index 1bfda3212720992a2fe5db183bc15591cc0bb374..cf7dd3b3e9e1943438c4d14d8f009dd1a78ca21d 100644 (file)
@@ -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) {