Multiple dispatch again

Michael Hudson mwh at
Wed Jan 15 17:48:08 CET 2003

mertz at (David Mertz) writes:

> 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.

The constraints it preserves aren't that hard.

> 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 :-)).

As I see it, the advantages of C3 are that you find out about problems
earlier, rather than when super() doesn't calls an unexpected method
some arbitrary time later.  Seems perfectly Pythonic to me.

> 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).

I think you'll have to argue that one with Guido.


  MARVIN:  What a depressingly stupid machine.
                    -- The Hitch-Hikers Guide to the Galaxy, Episode 7

More information about the Python-list mailing list