[issue6210] Exception Chaining missing method for suppressing context

Antoine Pitrou report at bugs.python.org
Wed Dec 29 11:40:09 CET 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

Le mercredi 29 décembre 2010 à 01:15 +0000, Ethan Furman a écrit :
> Ethan Furman <ethan at stoneleaf.us> added the comment:
> 
> > I'm talking about the exception raised from the except block.
> 
> So was I -- why should this:
> 
> try:
>     x = y / z
> except ZeroDivisionError as exc:
>     raise InvalidInput()
> 
> be different from this:
> 
> try:
>     x = divide_and_conquer(y, z)

I said the *except* block, not the *try* block ;)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6210>
_______________________________________


More information about the Python-bugs-list mailing list