[Python-Dev] Re: Non-integer Division
Guido van Rossum
guido@digicool.com
Mon, 12 Mar 2001 09:52:20 -0500
> > > // 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".
As I said in the other thread, it's too early to make the decision --
just present both options in the PEP, and arguments pro/con for each.
> > 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.
Fair enough.
> [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.
Understood.
> You haven't commented yet about the rational PEP, so I don't know if that's
> even an option.
Yes I have, but in summary, I still think rationals are a bad idea.
--Guido van Rossum (home page: http://www.python.org/~guido/)