[Python-bugs-list] [ python-Bugs-642489 ] better error reporting for MRO conflict

noreply@sourceforge.net noreply@sourceforge.net
Fri, 22 Nov 2002 11:56:19 -0800


Bugs item #642489, was opened at 2002-11-22 19:56
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=642489&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeremy Hylton (jhylton)
Assigned to: Guido van Rossum (gvanrossum)
Summary: better error reporting for MRO conflict

Initial Comment:
This patch improves the error reporting for MRO
disagreement that results from constraints that C3 is
unable to honor.  It's not clear what the best error
reporting would be.  On the one hand, it seems like the
exception should report exactly which constraint could
not be satisfied and why, but the constraints are a bit
suble to explain and perhaps hard from users to grok. 
It would also require a lot more code to keep track of
the exact cause of the conflict.

Instead, this patch just reports the names of the
classes that could not be added to the MRO.  It doesn't
report what constraint failed, but it does give you a
good clue about where to look.

The patch also adds a bunch of comments to the C3
implementation.  I hope that someone without the paper
will have a little chance of maintaining the code.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=642489&group_id=5470