Sam Ruby <[EMAIL PROTECTED]> wrote: > Leopold Toetsch wrote: >> Sam Ruby <[EMAIL PROTECTED]> wrote: >> >> [ snipped - all ok } >> >>>If I define an __add__ method with 16 arguments, Python will not throw >>>an exception. >> >> I didn't write that. I've said: *if* you call it via "a + b", Python >> throws an exception - that one I've shown. Anyway...
> What you wrote (and snipped) was > "I'd say, if you define an '__add__' method with 16 arguments, Python > will throw an exception,..." > To which I responded with the above. and after the snipped ellipsis my sentence did continue with " if you try to use C<+> with an object of that class:" >> You are still not getting the principal of the scheme, IMHO. It has >> nothing to do with Perl6 or any other language, nor with Python. > Either that, or I *am* getting the principle of the scheme. I guess > that this is the point where I need to return back to writing code and > test cases. > Leo - at one point you indicated that you might be interested in helping > to factor out the common code again. Sure, and I'm not stopping that. The overall conclusion of (even infix operator) method lookup was that it has to be done at runtime. It is up to the PMCs to provide a proper and language-specific find_method to locate the involved operation, MMD or not. And the runcore is responsible for calling the method. While you seem to admit that it has to be done at runtime you are doubting that it can be done fast and you are rolling your own incompatible dispatch scheme (how should that be faster then?). This made me utter above sentence. Further: The function signature of overloaded infix operations (and maybe others) is currently not appropriate for Python (and likely other languages). > - Sam Ruby leo