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 <rep...@bugs.python.org> <http://bugs.python.org/issue21930> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com