Skip to content

bpo-43656: Make FrameSummary robust towards un-repr-able values #25062

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

Closed
wants to merge 2 commits into from

Conversation

moi90
Copy link
Contributor

@moi90 moi90 commented Mar 29, 2021

try:
return repr(x)
except Exception as exc:
return "[Unrepresentable: {}]".format(exc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if exc is also not representable ?

@moi90
Copy link
Contributor Author

moi90 commented Mar 30, 2021

https://bugs.python.org/issue39228

As is true for most special methods, it is a bug for repr methods to raise.

I therefore retract the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants