[pypy-dev] getting rid of multimethods?

Armin Rigo arigo at tunes.org
Wed Jun 23 18:01:45 CEST 2004


On Thu, Jun 17, 2004 at 08:10:41AM +0200, Laura Creighton wrote:
> There is a niceness about how the multimethods group everything in one
> place.

Yes, their declarativeness is nice.  I don't think we should remove them, but
maybe we should move them away from run-time.

It would be possible to use the multimethod declarations only to generate
Python sources with the descriptors (i.e. the __add__&co methods).  The type
switches would be generated too.

This is basically what Holger suggested for descroperation.py already.  I
still think that it is overkill for descroperation.py, but for multimethods it
would be helpful as a check, or if you prefer reading the generated Python
source instead of the multimethod.py magic.

A bientot,


More information about the Pypy-dev mailing list