Tagged Questions
2
votes
2answers
51 views
Wrapping an Exception with context-management, using the with statement
Before I try to make this work, I wondered if anyone had tried this, whether it was a good idea or not, etc.
I find myself doing this a lot:
if some_result is None:
try:
raise ...