-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
return-in-finally in multiprocessing/connection.py #131233
Comments
I don't believe this is actually a bug. The logic as written:
While it's a genuinely cryptic way of writing the code, I'm not seeing an immediately obvious way to rewrite it to eliminate the return-in-finally without duplicating the Win32 overlapped IO result and error code checking logic. |
Yes, I see - the return is conditional so it's possible that what you wrote was the intention. Would this be a way to rewrite it?
|
https://github.com/python/cpython/blob/7fd61607cd28ec466717c78adfb1eb5b63add1f0/Lib/multiprocessing/connection.py#L330C1-L340C68
This is clearly a bug, because the
except:
clause contains a nakedraise
, i.e., asks for the exception to propagate on. But the return in finally swallows that exception.Linked PRs
The text was updated successfully, but these errors were encountered: