You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docs: the Reference says the exception is not available in a finally clause, but sys.exception() and a bare raise see it #162601
The finally section of the Reference (https://docs.python.org/dev/reference/compound_stmts.html#finally) says: "The exception information is not available to the program during execution of the finally clause." But in a finally clause run because of an exception, sys.exception() returns that exception and a bare raise re-raises it (test_raise.TestRaise.test_finally_reraise relies on the second):
Thank you for taking the time to open this issue. Python is a community-driven project, and we want it to be a welcoming place to learn and collaborate.
This issue appears to have been written with AI assistance. Please explain your issue in your own words and describe how you checked the information you provided. This helps us understand your issue and leaves more time to address other issues.
I think we can just remove the sentence or specify "may not be avaiable". There might be cases where there isn't any exception available but this needs investigation to be sure about it.
Activity
bedevere-app commentedon Nov 25, 2026
Thank you for taking the time to open this issue. Python is a community-driven project, and we want it to be a welcoming place to learn and collaborate.
This issue appears to have been written with AI assistance. Please explain your issue in your own words and describe how you checked the information you provided. This helps us understand your issue and leaves more time to address other issues.
Please read our guidelines for using AI tools.
picnixz commentedon Nov 25, 2026
I think we can just remove the sentence or specify "may not be avaiable". There might be cases where there isn't any exception available but this needs investigation to be sure about it.