[issue43737] Documentation of modulo operator should document behaviour clearly when second operator is negative
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: Negative modulo divisors is not a "beginner friendly" topic or even remotely relevant to most users. It is also trivially discoverable with a few seconds of experimentation at the interactive prompt. FWIW, I've read dozens of Python tutorials and don't recall a single one covering this case. We need a better reason to do this other than you insisting on it. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43737> _______________________________________
But Floor division with negative numbers is something that comes up - which is why we have a FAQ entry; but most beginners don't even know the FAQ exists. It just seem utterly bizzare that we have a tutorial but nothing that links the tutorial to the detail. I hang out on Quora and answer a lot of Python question and the lack of linkage to the detail is something that comes up regularly - the tutorial is a good introduction but it isnt clear where to go next. The feedback I got from Quora is that a number of users had come across the 'quirk' with floor division and modulo with negative divisiors, with several considering it a bug in Python simply because they could find NO documentation as to why the behaviour is so (The documentation system is difficult to search at the best of times, and many items aren't indexed). We must make sure that we experts don't look at the documentation without remembering that we know how things work - but that beginnners don't. They don't know that there is an FAQ, they don't know to look at the library documentation for information about how number operators work in Python (most beginners have no idea that numbers etc are even part of a library), and the reference documentation is definitely not beginner friendly. To be honest - I thought I gave a good reason for including that one sentence in the tutorial - but apparently one extra sentence is one sentence too far. On 10/04/2021 05:50, Raymond Hettinger wrote:
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment:
Negative modulo divisors is not a "beginner friendly" topic or even remotely relevant to most users. It is also trivially discoverable with a few seconds of experimentation at the interactive prompt. FWIW, I've read dozens of Python tutorials and don't recall a single one covering this case. We need a better reason to do this other than you insisting on it.
----------
_______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43737> _______________________________________ _______________________________________________ docs mailing list -- docs@python.org To unsubscribe send an email to docs-leave@python.org https://mail.python.org/mailman3/lists/docs.python.org/ Member address: anthony.flury@btinternet.com
participants (2)
-
Raymond Hettinger -
Tony Flury