[Python-Dev] Re: Python-checkins digest, Vol 1 #370 - 8 msgs
Moshe Zadka
Moshe Zadka <mzadka@geocities.com>
Tue, 29 Feb 2000 08:11:14 +0200 (IST)
On Mon, 28 Feb 2000, Ka-Ping Yee wrote:
> > (BTW, perhaps the __contains__ changes should be extended to __max__
> > and __min__? They share many of the same issues.)
>
> Indeed -- but then who do you trust? The first element of the
> sequence? Is it acceptable for
>
> max(a, b, c, d)
>
> to read as
>
> "a, please tell me which is the maximum among yourself, b, c, and d"
Ping, I hardly think Python is going to ever have multi-methods...
Of course, __max__ (just like __add__ now) should (in some theoretical
definition of should) be implemented with multi-dispatch. See MAL's
suggestion for coercion for pragmatic (though not theoretic) possible
workarounds.
--
Moshe Zadka <mzadka@geocities.com>.
INTERNET: Learn what you know.
Share what you don't.