cmp_exception gets promoted (essentially) to the C API function PyErr_GivenExceptionMatches().
cmp_exception gets promoted (essentially) to the C API function
PyErr_GivenExceptionMatches().

set_exc_info(): make sure to normalize exceptions.

do_raise(): Use PyErr_NormalizeException() if type is a class.

loop_subscript(): Use PyErr_ExceptionMatches() instead of raw pointer
compare for PyExc_IndexError.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator