multimethod (or rather overloading) in Python
anton muhin
antonmuhin at rambler.ru
Thu Feb 17 12:56:41 EST 2005
anton muhin wrote:
Correction:
> Of course, I can imagine some metaclasses magic that would allow to code:
>
> class MyClass(WithOverloading):
> @overloadMethod(A)
> def someMetod(self, _): ...
>
> But it would rather convoluted: the best idea I have so far is to mangle
> methods name in the manner most of C++ compilers do.
Stupid me. Of course, name magling is impossible and unnecessary. Sorry.
Still the question remains.
with the best regards,
anton.
More information about the Python-list
mailing list