Mark Shannon <m...@hotpy.org> added the comment:

Looking at the docs:

https://docs.python.org/3.6/library/sys.html#sys.exc_info states:
     If the current stack frame is not handling an exception, the information 
is taken from the calling stack frame, or its caller, and so on until a stack 
frame is found that is handling an exception.

And https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement

If no expressions are present, raise re-raises the last exception that was 
active in the current scope. If no exception is active in the current scope, a 
RuntimeError exception is raised indicating that this is an error.

Note that `sys.exc_info()` explicitly mentions scanning the stack, but `raise` 
just says "active in the current scope". Testing on 3.5 shows that "active in 
the current scope" does scan the stack (for simple calls at least).

Which means that the newly implemented behaviour is correct.



> Note that removing exc_type, exc_value and exc_traceback from PyThreadState 
> breaks Cython.

Is there a matching Cython issue?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue25612>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to