[Python-ideas] Raise exception if (not) true

spir denis.spir at gmail.com
Fri Feb 21 02:47:17 CET 2014


On 02/20/2014 10:13 PM, Markus Unterwaditzer wrote:
> Painting the bikeshed, i'd rather have the syntax
>
> assert x > 0, ValueError("x should be positive")

Looks good as well; (but maybe slightly more job to implement, due to change of 
syntax?)

d


More information about the Python-ideas mailing list