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
'value' attribute for ValueError #62366
Comments
A 'value attribute for ValueError could store a weakref to the value which triggered the exception. It should be a weakref so at to prevent accidental prevention of GC of the value. |
Just a gentle reminder guys. |
There's actually no advantage for a weakref here, since the exception object already holds an indirect reference to all the raising frame's locals through __traceback__. |
So, this is actually impossible to do. After discussing it (face-to-face) with a bunch of core devs, I think the only reasonable course of action is to close the issue and never speak of this again. |
Thanks for the analysis. Closing then! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: