Comment on PEP-0238
Grant Griffin
not.this at seebelow.org
Fri Jul 6 15:31:29 EDT 2001
In article <cpsngaja4g.fsf at cj20424-a.reston1.va.home.com>, Guido says...
>
>I currently favor div(x, y) over x//y and x div y. Maybe also add
>mod(x, y) for symmetry (that would also explain divmod() as a
>messenger from the future :-).
Messages from Guido's Time Machine sure are appealing, but I doubt that "divmod"
is actually used much, so maybe symmetry of the others with that doesn't matter
much. (Coincidentally, I just discovered "divmod" in "Python Pocket Reference"
10 minutes before reading this!--when I was enjoying special "small book daily
reading time".)
I guess I favor the operator format ("x div y", "x mod y") over the function
format ("div(x, y)", "mod(x, y)"). The operator format seems to read better
(more like "x / y"), and it matches other languages, like C, where these
operator thingies are expressed in operator format (albiet by a symbol: "/" and
"%".) If the operator style wins out, divmod might either be turned into an
operator, or left alone.
all-things-being-equal,-do-it-like-C-ly y'rs,
=g2
_____________________________________________________________________
Grant R. Griffin g2 at dspguru.com
Publisher of dspGuru http://www.dspguru.com
Iowegian International Corporation http://www.iowegian.com
More information about the Python-list
mailing list