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.

classification
Title: Documentation wrote __div__ instead of __truediv__
Type: Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, miss-islington, objectivitix, rhettinger, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2021-08-25 18:09 by objectivitix, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 27951 merged objectivitix, 2021-08-25 18:27
PR 27962 merged miss-islington, 2021-08-26 05:49
PR 27963 merged miss-islington, 2021-08-26 05:49
PR 27964 closed serhiy.storchaka, 2021-08-26 06:40
Messages (8)
msg400279 - (view) Author: Calo (objectivitix) * Date: 2021-08-25 18:09
The Python Language Reference, Chapter 6 (Expressions), Section 7 (Binary arithmetic operations) in Python version 3.9 has a sentence which reads:

"This operation can be customized using the special __div__() and __floordiv__() methods."

To my knowledge, when Python 3 was released, true division became the default, and __div__ became useless as well. Thus, I believe this part of the documentation should be changed to "[...] __truediv__() and __floordiv__() methods." to avoid misleading others.

P.S. This is my first time submitting a Python bug report, I'm just a Python enthusiast and I'm not familiar at all with these official bug reports (I have read https://docs.python.org/3/bugs.html though!), so please let me know and correct me if I've done something incorrectly! Thanks!
msg400280 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-08-25 18:11
Would you like to submit a PR?
msg400282 - (view) Author: Calo (objectivitix) * Date: 2021-08-25 18:14
I'd like to! Wait, so is this approved now? I'd simply need to open a PR? If so, on which repository do I do it?
msg400284 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-08-25 18:18
https://github.com/python/cpython
msg400285 - (view) Author: Calo (objectivitix) * Date: 2021-08-25 18:19
Got it, thank you very much! I found https://github.com/python/cpython/blob/main/Doc/reference/expressions.rst, I guess that's where I fork and edit
msg400311 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-08-26 05:49
New changeset 806e25fd3173a80021e6df87b81263b5f6056f38 by Objectivitix in branch 'main':
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951)
https://github.com/python/cpython/commit/806e25fd3173a80021e6df87b81263b5f6056f38
msg400316 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-08-26 07:03
New changeset 46970fdd8ddc18823519d1e1c57136f6bc2a8dac by Miss Islington (bot) in branch '3.9':
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951) (GH-27962)
https://github.com/python/cpython/commit/46970fdd8ddc18823519d1e1c57136f6bc2a8dac
msg400317 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-08-26 07:04
New changeset ea39933b4b76da35874be79f2384e24b38c37351 by Miss Islington (bot) in branch '3.10':
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951) (GH-27963)
https://github.com/python/cpython/commit/ea39933b4b76da35874be79f2384e24b38c37351
History
Date User Action Args
2022-04-11 14:59:49adminsetgithub: 89166
2021-08-26 07:04:54serhiy.storchakasetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.10, Python 3.11
2021-08-26 07:04:09serhiy.storchakasetmessages: + msg400317
2021-08-26 07:03:26serhiy.storchakasetmessages: + msg400316
2021-08-26 06:40:01serhiy.storchakasetpull_requests: + pull_request26411
2021-08-26 05:49:42miss-islingtonsetpull_requests: + pull_request26410
2021-08-26 05:49:14miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request26409
2021-08-26 05:49:11serhiy.storchakasetmessages: + msg400311
2021-08-25 18:27:30objectivitixsetkeywords: + patch
stage: patch review
pull_requests: + pull_request26398
2021-08-25 18:19:59objectivitixsetmessages: + msg400285
2021-08-25 18:18:05serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg400284
2021-08-25 18:14:00objectivitixsetmessages: + msg400282
2021-08-25 18:11:57rhettingersetnosy: + rhettinger
messages: + msg400280
2021-08-25 18:09:04objectivitixcreate