for / while else doesn't make sense

Random832 random832 at fastmail.com
Sun May 22 14:14:47 EDT 2016


On Sun, May 22, 2016, at 13:55, Jon Ribbens wrote:
> No, in Python integers are closed under the standard arithmetic
> operators (+ - * / % **)

Z is not closed under standard division, as surely as N isn't closed
under subtraction and R isn't closed under exponentiation. That is a
mathematical fact, not one about any particular language. What you are
saying is that Python 2's "/" is _not_ standard division (you want to
talk about the principle of least surprise...), and is therefore _not_ a
standard arithmetic operation. It's not Euclidean division, either,
since it gives a negative remainder for negative divisors.



More information about the Python-list mailing list