[issue21930] new assert raises syntax proposal
Ezio Melotti
report at bugs.python.org
Mon Jul 7 15:11:36 CEST 2014
Ezio Melotti added the comment:
Agreed, but there are a few problems with the proposals:
1) it requires the addition of a new keyword (raises), and that will break any program that uses it as an identifier;
2) the use case is arguably limited;
3) assertRaises is consistent with the other assert* methods, and it also provides way to inspect the exception, whereas IIUC what you are proposing does not (and also doesn't replace assertRaisesRegex);
4) I don't find your proposal simpler or more readable than what we have now:
In other words there are quite a few problems for little benefit, so even if you decide to bring this up to python-ideas, it's very unlikely that it will be accepted in its current form.
----------
components: +Tests
nosy: +ezio.melotti
resolution: -> rejected
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21930>
_______________________________________
More information about the Python-bugs-list
mailing list