PEP 318
Michele Simionato
michele.simionato at poste.it
Wed Mar 24 00:04:44 EST 2004
Skip Montanaro <skip at pobox.com> wrote in message news:<mailman.289.1080056808.742.python-list at python.org>...
>
> Okay, but can you explain the mechanism or point me to the original post? I
> can't find it on Google (probably too recent). Multimethod(a,b)() won't
> know that each call is for __mul__ will it (maybe it will peek at the
> func_name attribute)? From what you posted, all I saw was multiple
> definitions of __mul__. Only the last one will be present as a method in
> the class's definition.
>
> Skip
Please take what I posted just as an idea (it is not even my idea!), not as
an implementation proposal.
I don't have an implementation, but I am pretty much convinced that it is
possible and not that hard.
I am not suggesting that we put multimethods in Python 2.4.
I am just noticing that the notation could be used to denote
multimethods too, as Ville Vainio suggested (sorry for the mispelling,
Ville!).
Just to support your point that the decorator idea is a Pandora box, and
we can extract anything from it ;)
Michele Simionato
More information about the Python-list
mailing list