[Python-Dev] Integer division transition
Fred L. Drake, Jr.
fdrake@acm.org
Wed, 8 Nov 2000 09:38:51 -0500 (EST)
Charles G Waldman writes:
> OK, I stand corrected and feel suitably foolish. However I still
> think it's quite inconsistent to have divmod(a,b) but a div b.
I suspect div would be much more widely used than divmod(), which is
essentially a performance optimization when you need both results.
One reason *not* to make divmod() an operator, aside from issues of
legacy code, is that it really returns two results (never mind that it
returns exactly one tuple); I can't think of another operator that
conceptually returns two values.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Digital Creations