[docs] Tutorial and Glossary misleading/ambiguous wording on "floor division"

Dick Jackson dick at d-jackson.com
Fri Mar 9 17:51:54 EST 2018


Hi,

On https://docs.python.org/3.6/tutorial/introduction.html <https://docs.python.org/3.6/tutorial/introduction.html>
I think this wording is misleading:
To do floor division <https://docs.python.org/3.6/glossary.html#term-floor-division> and get an integer result (discarding any fractional result) you can use the // operator;

Considering negative numbers (where -4 // 3 gives -2, which is clearly not "discarding the fraction" from -1.333), this would be better:
To do floor division <https://docs.python.org/3.6/glossary.html#term-floor-division> and get an integer result (rounding down to next lower integer) you can use the // operator;

Actually, I'd say the glossary definition of "floor division" could be improved as well, at https://docs.python.org/3.6/glossary.html#term-floor-division <https://docs.python.org/3.6/glossary.html#term-floor-division> :
Mathematical division that rounds down to nearest integer.
… might be better as:
Mathematical division that rounds down to the next lower integer.

The idea of "rounding" to the "nearest integer" might make a lot of people think of normal rounding, even though the word "down" is there. I think my phrasing is less ambiguous. Thanks for considering these changes!

Cheers,
-Dick
Dick Jackson Software Consulting Inc.
Victoria, BC, Canada    +1-250-220-6117	
dick at d-jackson.com <mailto:dick at d-jackson.com>
http://www.d-jackson.com <http://www.d-jackson.com/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20180309/4977cb4d/attachment-0001.html>


More information about the docs mailing list