status of Programming by Contract (PEP 316)?

Russ uymqlp502 at sneakemail.com
Fri Aug 31 15:48:41 EDT 2007


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.




More information about the Python-list mailing list