This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brian.curtin
Recipients brian.curtin, ezio.melotti, jaime.buelta, lars.gustaebel, meador.inge, r.david.murray
Date 2010-02-28.01:21:04
SpamBayes Score 1.1521557e-08
Marked as misclassified No
Message-id <>
Good point. How about version 5? It uses base Exception in the context manager, which will allow us to differentiate between no exception being raised, and the wrong one being raised. After the context manager, we check the type of the exception to make sure it's correct.

I changed the exception being raised to an IOError. It could be anything, but given that AssertionError is what gets raised by the assert functions, it seemed better to avoid that one specifically. This is fairly minor, though.

If you change the "raise IOError" to be a pass statement, or another type of exception, you can see that the same level of information is given to you as in patch version 3 by Lars.
Date User Action Args
2010-02-28 01:21:09brian.curtinsetrecipients: + brian.curtin, lars.gustaebel, ezio.melotti, r.david.murray, meador.inge, jaime.buelta
2010-02-28 01:21:08brian.curtinsetmessageid: <>
2010-02-28 01:21:07brian.curtinlinkissue7232 messages
2010-02-28 01:21:06brian.curtincreate