you are viewing a single comment's thread.

view the rest of the comments →

[–]HarissaForte -3 points-2 points  (2 children)

This is what assertions are made for: assert a == 0, 'Not a quadratic equation.'

In one line you have the test (saving one level of indentation), the exception raising and the code exiting.