On Tue, Oct 15, 2013 at 11:52 AM, R. David Murray <rdmur...@bitdance.com> wrote:
> I think 'trap' would be much clearer.

+1.  Short and sweet, and just ambiguous enough that you don't leap to
the conclusion that the error is ignored.  I agree that "suppress" is
basically a synonym for "ignore"; trap at least *implies* some kind of
control flow change, which is what's needed to prevent misconceptions.

Personally, I would rate "catch" higher than "trap" because it further
implies that it is catching a thrown exception, but would compromise
to "trap" if that'll end the thread sooner.  ;-)

>  What about making the context
> manager provide the trapped exception, in a fashion similar to
> what assertRaises does?

Sadly, that won't work, since context managers provide a value
*before* the block is executed, not after.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to