On 06/25/17 12:10, Steve D'Aprano wrote:
py> isinstance(KeyboardInterrupt(), Exception) False py> isinstance(ValueError, Exception) False
That's because KeyboardInterrupt is not a subclass of Exception. If you want to catch that as well you need to check against BaseException.
https://docs.python.org/3.6/library/exceptions.html#exception-hierarchy -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/listinfo/python-list