Use

assert a == b: "a should equals b"

instead of

assert a == b: "a is not equal to b".

Double check the code to see if this is uniformly done.

See also the stackoverflow question on error messages in preconditions.

Submitted by Arie van Deursen on 27 March 2011 at 15:37

On 27 March 2011 at 15:37 Arie van Deursen tagged refactoring

On 27 March 2011 at 15:38 Arie van Deursen removed tag improvement

On 27 March 2011 at 15:38 Arie van Deursen tagged 4.5_snapshot

Log in to post comments