Joe Strout wrote:
I'd rather risk something that breaks the code in an obvious way during development, than risk something that breaks it in a subtle way and is more likely to be discovered by the end-user.

Seems to me that putting in these kinds of assertions isn't
going to make much difference to the proportion of bugs that
slip through testing.

Your test suite still has to be comprehensive enough to
trigger the assignment of the erroneous object. If it's
not, your assertions won't catch anything. If it is, then
you would have found out during testing in any case.
It might be more difficult to *fix* the problem without
the assertions, but you will still catch it.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to