Skip to content

icontract 2.7.0

Compare
Choose a tag to compare
@mristin mristin released this 17 Sep 05:56
· 3 commits to master since this release
625e797
  • Allowed to enforce invariants on attribute setting (#292)

    Originally, we had enforced invariants only at calls to "normal" methods, and excluded __setattr__ since it is usually too expensive to verify invariants whenever setting an attribute.

    However, there are use cases where the users prefer to incur to computational overhead for correctness. To that end, we introduced the feature to steer when the invariants are enforced (at method calls, on setting attributes, or in both situations).