classification
Title: Tutorial Documentation for 3.1.1. Numbers missing "result"
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, erlendaasland, ezio.melotti, miss-islington, rhettinger, thomaspcavalli, willingc
Priority: normal Keywords: patch

Created on 2021-04-04 23:44 by thomaspcavalli, last changed 2021-05-14 20:06 by willingc. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25191 merged erlendaasland, 2021-04-05 07:39
PR 26136 merged miss-islington, 2021-05-14 19:09
PR 26137 merged miss-islington, 2021-05-14 19:09
Messages (3)
msg390217 - (view) Author: Thomas Cavalli (thomaspcavalli) Date: 2021-04-04 23:44
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.
msg393690 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2021-05-14 20:06
New changeset dd4f7d96cb78b424ef8fa705aaee15a837b2d240 by Miss Islington (bot) in branch '3.10':
bpo-43729: Clarify comment in tutorial example (GH-25191) (#26136)
https://github.com/python/cpython/commit/dd4f7d96cb78b424ef8fa705aaee15a837b2d240
msg393691 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2021-05-14 20:06
New changeset c90642b0d48e5ab40d05b526311ba19bb87f3233 by Miss Islington (bot) in branch '3.9':
bpo-43729: Clarify comment in tutorial example (GH-25191) (GH-26137)
https://github.com/python/cpython/commit/c90642b0d48e5ab40d05b526311ba19bb87f3233
History
Date User Action Args
2021-05-14 20:06:42willingcsetmessages: + msg393691
2021-05-14 20:06:16willingcsetnosy: + willingc
messages: + msg393690
2021-05-14 19:09:21miss-islingtonsetpull_requests: + pull_request24771
2021-05-14 19:09:16miss-islingtonsetnosy: + miss-islington

pull_requests: + pull_request24770
2021-05-14 19:08:39iritkatrielsetversions: + Python 3.10, Python 3.11
2021-04-05 14:19:20thomaspcavallisetstatus: open -> closed
resolution: works for me
stage: patch review -> resolved
2021-04-05 07:47:09serhiy.storchakasetnosy: + rhettinger, ezio.melotti
2021-04-05 07:39:36erlendaaslandsetkeywords: + patch
nosy: + erlendaasland

pull_requests: + pull_request23933
stage: patch review
2021-04-04 23:44:25thomaspcavallicreate