On 12/04/2012 23:34, Ethan Furman wrote:
Okay, so I haven't asked a stupid question in a long time and I'm
suffering withdrawal symptoms... ;)

5 % 0 = ?

It seems to me that the answer should be 5: no matter how many times we
add 0 to itself, the remainder of the intermediate step will be 5.

Is there a postulate or by definition answer as to why this should not
be so?

If x > 0, 0 <= 5 % x < x.

At the limit of x == 0, you get 0 <= 5 % 0 < 0.

At that point, an exception is probably a good idea! :-)
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to