On Feb 8, 11:08 pm, Paul Rudin <paul.nos...@rudin.co.uk> wrote:

> It works because 0 tests false and because integer division yields
> integers... eventually you'll get something like 1/10 giving 0.
>
> It's not necessarily a good thing to rely on. For example if you try it
> after "from __future__ import division" - or in python 3 - you'll get a
> float as the result of the division and it won't test False.

What operator should I use if I want integer division?
Ada and Pascal used "div" if I recall rightly.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to