[Python-ideas] Inline 'raises' expression
g.brandl at gmx.net
Mon Aug 25 22:27:55 CEST 2008
Raymond Hettinger schrieb:
> From: "Fredrik Johansson" <fredrik.johansson at gmail.com>
>> one could just write
>> assert 1/0 raises ZeroDivisionError
> This would be a nice extension to the assertion syntax.
It certainly looks good, and is probably implemented quickly.
However, it introduces a new pseudo-keyword, like "as" was in the past,
as we certainly don't want to make "raises" a "full" one.
More information about the Python-ideas