
We feel like this may make sense to bring up, too: https://rust-lang.github.io/rfcs/2169-euclidean-modulo.html On 2022-03-20 04:06, Om Joshi wrote:
Has anyone in this thread linked this blog post yet?
http://python-history.blogspot.com/2010/08/why-pythons-integer-division-floo...
Much is a rehash of this thread but for completeness it might be useful to read Guido van Rossum's thoughts and the subsequent discussion in the comments section.
@Tim I believe you are mentioned at the bottom of the post.
Om
---- On Sun, 20 Mar 2022 01:53:51 -0500 Ben Rudiak-Gould <benrudiak@gmail.com> wrote ----
On Fri, Mar 18, 2022 at 8:30 PM MRAB <python@mrabarnett.plus.com> wrote:
Wikipedia describes Euclidean division.
Basically, the modulo is non-negative:
a == b * q + r where 0 <= r < abs(b)
That convention in the Wikipedia article dates back to a 2004 edit by an anonymous (IP) editor. The only reference in that version was to a course handout that only considered positive denominators.
There's nothing wrong with the convention, but I'm suspicious of the idea that it's a widespread standard of some sort. I've never heard of it before. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/MG7J6K... Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/RAX6SU... Code of Conduct: http://python.org/psf/codeofconduct/