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:[email protected] VoIP: sip:[email protected] -- https://mail.python.org/mailman/listinfo/python-list
