[New-bugs-announce] [issue43729] Tutorial Documentation for 3.1.1. Numbers missing "result"

Thomas Cavalli report at bugs.python.org
Sun Apr 4 19:44:25 EDT 2021


New submission from Thomas Cavalli <thomaspcavalli at gmail.com>:

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.

----------
assignee: docs at python
components: Documentation
messages: 390217
nosy: docs at python, thomaspcavalli
priority: normal
severity: normal
status: open
title: Tutorial Documentation for 3.1.1. Numbers missing "result"
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43729>
_______________________________________


More information about the New-bugs-announce mailing list