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

noreply@sourceforge.net noreply@sourceforge.net
Mon, 25 Nov 2002 13:39:38 -0800


Bugs item #642489, was opened at 2002-11-22 14: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: Closed
>Resolution: Accepted
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.


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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-11-25 16:39

Message:
Logged In: YES 
user_id=6380

Checked into CVS, with some tweaks.

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

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