[issue43034] Python tutorial misleads users about floor division behavior
Jesse Silverman
report at bugs.python.org
Fri Jan 29 17:02:41 EST 2021
Jesse Silverman <jessevsilverman at gmail.com> added the comment:
I understand and agree with both comments.
I will confirm that a substantial number of people think -17 // 3 yields -5.0, so when I saw this I wondered if it reinforced that common misconception.
I was curious enough to not just confirm in the actual docs not only that -17 // 3 == -6.0 but learned why it does so.
I would be happy to see any of Terry's three suggestions added, with the first one adding the most bang for the buck (if someone is surprised to see -6.0 there, they can go look up why).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43034>
_______________________________________
More information about the Python-bugs-list
mailing list