Pep 238 Why new // operator (Non-integer Division)

Alex Martelli aleaxit at yahoo.com
Sat Mar 17 03:13:26 EST 2001


"Tim Peters" <tim.one at home.com> wrote in message
news:mailman.984811161.25962.python-list at python.org...
    [snip]
> > So maybe some other symbol should be used.
>
> Why bother?  Python's # looks an awful lot like C++'s preprocessor
directive
> flag too.  Guido would probably prefer infix "div" (a la Pascal), but a
new
> keyword is a very hard sell.

So what's so terrible about non-infix notation, a builtin div(a,b) [and
mod(a,b)
too since we're at it...?].  Sure, infix can be handy -- but then this might
be
the occasion to steal a leaf from Haskell's book... let any 2-operand
function
be used as an infix operator (possibly with some stropping if that is needed
to disambiguate syntax).


Alex






More information about the Python-list mailing list