ANN: Design By Contract for Python 1.0 beta 1
Terence Way
terry at wayforward.net
Mon May 26 22:02:24 EDT 2003
On Mon, 26 May 2003 22:22:42 -0400, Erik Max Francis wrote:
> Terence Way wrote:
>> Also ContractViolationError will
>> inherit from AssertionError.
>
> Shouldn't they all, then? Seems to me that they're all effectively
> assertions of one type or another. If one literally derives from
> AssertionError, it seems to me they all should.
You're right. And they do. The heirarchy looks like:
AssertionError
ContractViolationError
PreconditionViolationError
PostconditionViolationError
InvariantViolationError
More information about the Python-list
mailing list