[Python-ideas] Inline 'raises' expression

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Aug 25 01:47:10 CEST 2008

Fredrik Johansson wrote:

> one could just write
>     assert 1/0 raises ZeroDivisionError

It's been pointed out that using assert for testing
is not the best idea, since then you can't test that
the code works properly with assertions turned off.


More information about the Python-ideas mailing list