Multiple dispatch again

David Mertz mertz at gnosis.cx
Fri Jan 3 02:04:48 EST 2003


|"Samuele Pedroni" <pedronis at bluewin.ch> writes:
|> 1) You can think about operators as multimethods vs. __add__ __radd__ .

Mike Meyer <mwm at mired.org> wrote previously:
|The interesting question this brings up is how replacing the current
|set of rules by a true multiple dispatch mechanism would change adding
|types/methods to the existing type lattice. Anyone have any thoughts
|on that?

I'm not sure I understand why much anything would have to change.  My
'lexicographic_mro()' and 'weighted_mro()' linearizations utilize the
existing method resolution order (object.mro()) for the heavy work.
What improvement would a change to this offer?

Of course, the way I set up my sample, it is simple to plug in your
favorite linearization technique.  This is a rough area in my knowledge,
so I'm not religious in my preference for a particular style.

Yours, David...

--
 mertz@   _/_/_/_/_/_/_/ THIS MESSAGE WAS BROUGHT TO YOU BY:_/_/_/_/ v i
gnosis  _/_/                    Postmodern Enterprises         _/_/  s r
.cx    _/_/  MAKERS OF CHAOS....                              _/_/   i u
      _/_/_/_/_/ LOOK FOR IT IN A NEIGHBORHOOD NEAR YOU_/_/_/_/_/    g s






More information about the Python-list mailing list