[issue31021] Clarify programming faq.

2017-09-18 Thread R. David Murray
R. David Murray added the comment: I think there is nothing to do here unless Mark likes my suggestion and/or someone comes up with an even better improvement. -- ___ Python tracker __

[issue31021] Clarify programming faq.

2017-09-18 Thread Ashok Bakthavathsalam
Ashok Bakthavathsalam added the comment: So, what is the resolution on this? -- nosy: +kgashok ___ Python tracker ___ ___ Python-bugs

[issue31021] Clarify programming faq.

2017-07-26 Thread Marco Buttu
Marco Buttu added the comment: Terry thanks for opening this issue. The title of the FAQ makes me think that the section wants to clarify why -22 // 10 returns -3. I am a bit confused, maybe because -22//10 == -3 does not surprise me, and so I do not understand the point :( This seems to me

[issue31021] Clarify programming faq.

2017-07-25 Thread R. David Murray
R. David Murray added the comment: I think Terry and his OP are reacting to the fact that "-190 % 12 == -10" looks like it is saying that that expression is True in Python, which it is not (and that's the point). IMO, another issue is that "and then compilers that truncate i // j need to make

[issue31021] Clarify programming faq.

2017-07-25 Thread Mark Dickinson
Mark Dickinson added the comment: Terry: can you clarify which part you think is potentially confusing? I'm having a hard time seeing the text as confusing, but I suspect I'm too close to the subject matter to be able to tell. Charles: I think you're missing the point (which does rather reinfo

[issue31021] Clarify programming faq.

2017-07-25 Thread Charles Wohlganger
Charles Wohlganger added the comment: Modulo is defined mathematically as the remainder of Euclidian division. I.E. a positive r where a % b = r is equivalent to a = b * x + r. I think it confuses the issue to say "-190 % 12 were the mathematical equivalent -10", when that is technically incor

[issue31021] Clarify programming faq.

2017-07-25 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue31021] Clarify programming faq.

2017-07-24 Thread Ashok Bakthavathsalam
Changes by Ashok Bakthavathsalam : -- pull_requests: +2904 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue31021] Clarify programming faq.

2017-07-24 Thread Terry J. Reedy
New submission from Terry J. Reedy: https://docs.python.org/3/faq/programming.html#why-does-22-10-return-3 "Why does -22 // 10 return -3? It’s primarily driven by the desire that i % j have the same sign as j. If you want that, and also want: i == (i // j) * j + (i % j) then integer division h