]> granicus.if.org Git - python/commitdiff
SF bug #699934: Obscure error message
authorRaymond Hettinger <python@rcn.com>
Sun, 6 Apr 2003 19:13:41 +0000 (19:13 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 6 Apr 2003 19:13:41 +0000 (19:13 +0000)
mwh pointed out that the error message did not
make sense if obtained by rearranging the bases.

Lib/test/test_descr.py
Objects/typeobject.c

index d925c7585c75d66cc36ba39f7127da151d4c51bb..507938e607701ca69788b44612b46045da471c8a 100644 (file)
@@ -1062,9 +1062,8 @@ def consistency_with_epg():
           (EditableScrollablePane, ScrollablePane, EditablePane,
            Pane, ScrollingMixin, EditingMixin, object))
 
-mro_err_msg = """Cannot create class.The superclasses have conflicting
-inheritance trees which leave the method resolution order (MRO)
-undefined for bases """
+mro_err_msg = """Cannot create a consistent method resolution
+order (MRO) for bases """
 
 def mro_disagreement():
     if verbose: print "Testing error messages for MRO disagreement..."
index 4a13928c214c5690d1bd25371c83d8fdeb5b8feb..fea6e15a672800666622a313a0fc5e4b3e0a21fd 100644 (file)
@@ -1082,10 +1082,8 @@ set_mro_error(PyObject *to_merge, int *remain)
        }
        n = PyDict_Size(set);
 
-       off = PyOS_snprintf(buf, sizeof(buf), "Cannot create class.\
-The superclasses have conflicting\n\
-inheritance trees which leave the method resolution order (MRO)\n\
-undefined for bases");
+       off = PyOS_snprintf(buf, sizeof(buf), "Cannot create a \
+consistent method resolution\norder (MRO) for bases");
        i = 0;
        while (PyDict_Next(set, &i, &k, &v) && off < sizeof(buf)) {
                PyObject *name = class_name(k);