Funny. I thought that the PEP was quite strong enough already in its desire to stay away from multi-dispatch. But sure, I don't mind making it stronger. :-)
On Wed, May 22, 2013 at 7:12 PM, Nick Coghlan <[email protected]> wrote: > On Thu, May 23, 2013 at 10:14 AM, Glenn Linderman <[email protected]> > wrote: >> Yet about half of the operator overloads would be incomplete if there were >> not corresponding __r*__ methods (__radd__, __rsub__, etc.) because the >> second parameter is as key to the dispatch as the first. >> >> While unary operators, and one argument functions would be fully covered by >> single dispatch, it is clear that single dispatch doesn't cover a large >> collection of useful cases for operator overloading. > > The binary operators can be more accurately said to use a complicated > single-dispatch dance rather than supporting native dual-dispatch. As > you say, the PEP would be strengthened by pointing this out as an > argument in favour of staying *away* from a multi-dispatch system > (because it isn't obvious how to build a comprehensible one that would > even support our existing NotImplemented based dual dispatch system > for the binary operators). > > Cheers, > Nick. > > -- > Nick Coghlan | [email protected] | Brisbane, Australia > _______________________________________________ > Python-Dev mailing list > [email protected] > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > http://mail.python.org/mailman/options/python-dev/guido%40python.org -- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
