This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thomaspcavalli
Recipients docs@python, thomaspcavalli
Date 2021-04-04.23:44:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617579865.45.0.541169648182.issue43729@roundup.psfhosted.org>
In-reply-to
Content
The Division (/) section example uses the commented variable "result" without it being defined.  I am counting 4 numbers, (5.6667, 5, 2, 17), that are called result. The correct result can be implied but its poor documentation. So, either change:
>>> 17 // 3   # floor division discards the fractional part
to
>>> result = 17 // 3   # floor division discards the fractional part

or change:
>>> 5 * 3 + 2   # result * divisor + remainder
to
>>> 5 * 3 + 2  # floor * divisor + remainder

I suggest the latter as it explains the formula for floor.
History
Date User Action Args
2021-04-04 23:44:25thomaspcavallisetrecipients: + thomaspcavalli, docs@python
2021-04-04 23:44:25thomaspcavallisetmessageid: <1617579865.45.0.541169648182.issue43729@roundup.psfhosted.org>
2021-04-04 23:44:25thomaspcavallilinkissue43729 messages
2021-04-04 23:44:24thomaspcavallicreate