Message390264
The behavior of a%b when a is positive and b is negative can be suprising.
I understand that the behavior is so that the identity
a = (a//b)*b + a%b
can be preserved regardless of the signs of a or b.
but the result is different from other languages which is why it can be surprising.
I would be happy to do the grunt work to make the changes if some can suggest where.
Do we - add a warning to the https://docs.python.org/3/tutorial/introduction.html#numbers page, or should we link to a new page that details and explains the behavior. Which is more 'pythonic' in terms of documentation ? |
|
| Date |
User |
Action |
Args |
| 2021-04-05 21:49:56 | anthony-flury | set | recipients:
+ anthony-flury |
| 2021-04-05 21:49:56 | anthony-flury | set | messageid: <[email protected]> |
| 2021-04-05 21:49:56 | anthony-flury | link | issue43737 messages |
| 2021-04-05 21:49:56 | anthony-flury | create | |
|