status of Programming by Contract (PEP 316)?
Sat Sep 1 08:35:42 CEST 2007
Russ <uymqlp502 at sneakemail.com> writes:
> 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
But I think you give a lot of that back when you turn the checks off.
The errors you detect when the checks are enabled are only the ones
that result from your test data. Turn off the checks and expose the
application to data from a potentially different distribution, and
you're back where you started.
More information about the Python-list