Multiple dispatch again

David Mertz mertz at
Sat Jan 4 08:36:07 CET 2003

"Samuele Pedroni" <pedronis at> wrote previously:
|> Is there a (good) reason for this change, or could it be an artifact
|> of the alpha version?  I don't have 2.3 installed myself.

OK, I read the thread at:

I can now say with absolute certainty that -single- dispatch fills me
with Fear, Uncertainty, and Doubt.

Since the BDFL has spoken, I assume 2.3 is going with C3 MRO.  But I
don't like that.  I think it will be a wart for two reasons.  One is
that--in contrast to the so-called "naive ordering"--you cannot explain
C3 to anyone without making their brain explode.  In a way, the
consequences will be less surprising, but almost no one will be able to
comprehend exactly what the rule is.  That doesn't match my idea of
Python (it's not Lisp :-)).

But the idea of raising an error on inconsistencies also strikes me as a
wart for the same reason that I think the incommensurability of complex
numbers with other objects is a wart (and Python's biggest wart).  It is
a nod to purity over practicality.  Sure complex numbers aren't -really-
bigger or smaller than integers, but setting an (arbitrary)
well-ordering makes sorting easy.  Likewise, inconsistency in the class
graph isn't -really- well founded, but that's a fact about graph theory,
not about everyday programming.  In this case, I'd rather have something
that is unintuitive at the margins than I would an exception.

Oh well.  A lot fewer people will ever -notice- the MRO change than did
the complex comparisons.  So in a sense, my concern with "practicality"
is itself overly pure.

Yours, David...

mertz@  | The specter of free information is haunting the `Net!  All the
gnosis  | powers of IP- and crypto-tyranny have entered into an unholy
.cx     | alliance...ideas have nothing to lose but their chains.  Unite
        | against "intellectual property" and anti-privacy regimes!

More information about the Python-list mailing list