PEP 238 (revised)

Ken Seehof kens at sightreader.com
Fri Jul 27 03:08:36 CEST 2001


From: "Guido van Rossum" <guido at python.org>


> ...
> Open Issues
> 
>     - It has been proposed to call // the quotient operator.  I like
>       this.  I might rewrite the PEP to use this if enough people like
>       it.  (But isn't the assumption that this truncates towards
>       zero?)
> ...

I like quotient too just because the word hasn't been used yet.   Yes,
this truncates towards zero, but I don't really think of it in those terms.
That's an algebraic way of looking at things.  I think of this "quotient"
concept as a companion to "modulus".  It's a nice clean concept that
maintains closure for integers, rather than a truncation of something.
The term "floor division" to distinguish from "true division" seems
somehow less pure, since the concept is dragged in from the world of
real numbers.

Hmm, does this mean we rename divmod to quomod?  :-)

- Ken Seehof






More information about the Python-list mailing list