[Python-ideas] Inline 'raises' expression

Raymond Hettinger python at rcn.com
Mon Aug 25 02:16:45 CEST 2008


From: "Fredrik Johansson" <fredrik.johansson at gmail.com>
> one could just write
> 
>    assert 1/0 raises ZeroDivisionError

+1

This would be a nice extension to the assertion syntax.


Raymond



More information about the Python-ideas mailing list