[Python-Dev] FW: multimethod-0.1
David Abrahams
David Abrahams" <dave@boost-consulting.com
Thu, 15 Aug 2002 00:54:42 -0400
From: "Tim Peters" <tim.one@comcast.net>
> I haven't studied this, but from a quick glance it looks competent.
>
>
> Multimethod-0.1 is another python module for implementing multimethods
> (a.k.a. generic functions, multiple-argument method dispatch). This
> one features:
>
> - support for Python2.2 type/class unification
> - a precedence graph for more efficient dispatching
> - a best-fit resolution algorithm, in which the method closest in
> inheritance distance is called
> - a versatile 'call-next-method' or 'super' function.
>
> Available at http://bent-arrow.com/python and the Vaults of Parnassus.
>
> -Coady
It's a good start, but from the docs it doesn't appear to deal with:
a. Type categories -- it seems as though the only way for a multimethod
implementation to match an actual argument is if the formal argument has an
inheritance relationship with it.
b. Implicit conversions -- If I declare a function that accepts a Python
int, can I pass a Python float?
I think both of the above are important for any Python multimethod
implementation.
-----------------------------------------------------------
David Abrahams * Boost Consulting
dave@boost-consulting.com * http://www.boost-consulting.com
#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################