[Python-ideas] Making assert raise a different exception type
cool-RR
cool-rr at cool-rr.com
Fri Oct 16 18:16:19 CEST 2009
Hello!
I would have liked to do something like this:
assert some_false_condition, ValueError("Message")
Meaning that if the assertion fails, the ValueError is raised instead of
AssertionError. Do you think it's something that has a chance of being
implemented? If so, I will write a PEP.
Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20091016/37087fac/attachment.html>
More information about the Python-ideas
mailing list