Neil Cerutti wrote: > Who watches the watchmen? The contracts are composed by the > programmers writing the code. Is it likely that the same person > who wrote a buggy function will know the right contract?
The idea here is that errors in the self-testing code are unlikely to be correlated with errors in the primary code. Hence, you get a sort of multiplying effect on reliability. For example, if the chance of error in the primary code and the self-test code are each 0.01, the chance of an undetected error is approximately 0.01^2 or 0.0001. -- http://mail.python.org/mailman/listinfo/python-list