[Python-Dev] Re: Non-integer Division

Moshe Zadka moshez@zadka.site.co.il
Mon, 12 Mar 2001 02:36:58 +0200 (IST)


On Sun, 11 Mar 2001, Guido van Rossum <guido@digicool.com> wrote:

> > // Operator
> 
> Note: we could wind up using a different way to spell this operator,
> e.g. Pascal uses 'div'.  The disadvantage of 'div' is that it
> introduces a new reserved word, with all the issues it creates.  The
> disadvantage of '//' is that it means something very different to Java
> and C++ users.

I have zero (0) intuition about what is better. You choose --- I have
no opinions on this. If we do go the "div" route, I need to also think
up a syntactic migration path once I figure out the parsing issues
involved. This isn't an argument -- just something you might want to 
consider before pronouncing on "div".

> Maybe for compatibility of bytecode files we should come up with a
> better name, e.g. FLOAT_DIV?

Hmmmm.....a bytecode files so far have failed to be compatible for
any revision. I have no problems with that, just that I feel that if
we're serious about comptability, we should say so, and if we're not,
then half-assed measures will not help.

[re: from __future__ import non_integer_division] 
> I find "non_integer_division" rather long.  Maybe it should be called
> "float_division"?

I have no problems with that -- except that if the rational PEP is accepted,
then this would rational_integer_division, and I didn't want to commit
myself yet.

You haven't commented yet about the rational PEP, so I don't know if that's
even an option.
-- 
"I'll be ex-DPL soon anyway so I'm        |LUKE: Is Perl better than Python?
looking for someplace else to grab power."|YODA: No...no... no. Quicker,
   -- Wichert Akkerman (on debian-private)|      easier, more seductive.
For public key, finger moshez@debian.org  |http://www.{python,debian,gnu}.org