pre/post-condition support?

Greg Wilson gvwilson at nevex.com
Sun Nov 28 13:51:38 EST 1999


Has anyone experimented with Python extensions to support programming by
contract (pre/post conditions on methods + state assertions that are
respected by inheritance)?  If so, I'd welcome pointers.

Thanks,

Greg

p.s. I'm aware this can be done by hand by putting assertions at the start
and end of methods.  However, that doesn't automatically work right when
methods have multiple exit points (return statements, exceptions that
callers are expected to catch, etc.), and isn't respected by inheritance.







More information about the Python-list mailing list