Skip to content

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

Closed
moi90 wants to merge 2 commits intopython:masterfrom
moi90:fix-issue-43656
Closed

bpo-43656: Make FrameSummary robust towards un-repr-able values#25062
moi90 wants to merge 2 commits intopython:masterfrom
moi90:fix-issue-43656

Conversation

@moi90
Copy link
Copy Markdown
Contributor

@moi90 moi90 commented Mar 29, 2021

try:
return repr(x)
except Exception as exc:
return "[Unrepresentable: {}]".format(exc)
Copy link
Copy Markdown
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
Copy Markdown
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