On Apr 3, 10:00 pm, Steven D'Aprano <st...@remove-this- cybersource.com.au> wrote: > Tests which you know can't fail are called assertions, pre-conditions and > post-conditions. We test them because if we don't, they will fail :)
Well, yes, but that can get rather tedious at times: a = 1 assert 0 < a < 2 b = a + 3 assert 2 < b - a < 4 c = b * 5 assert not c % 5 At least, I usually ameliorate the pain a little bit by not bothering to print any debugging information at the assertions until one of them actually fails; otherwise I'd *never* get any real coding done :-) -- http://mail.python.org/mailman/listinfo/python-list