On 10/17/2013 01:57 PM, Xavier Morel wrote:
On 2013-10-17, at 22:11 , Ethan Furman wrote:
On 10/17/2013 01:03 PM, Terry Reedy wrote:
class suppress:
def __init__(self, *exceptions):
self.exceptions = exceptions
def __exit__(self, etype, eval, etrace):
return etype in self.exceptions
This fails when etype is a subclass of the exceptions, as mentioned in the
original issue.
That's fixed by using `issubclass` and does not infirm Terry's point does it?
Nope, and thanks for posting the correct verbage.
--
~Ethan~
_______________________________________________
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