-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
bpo-41031: Match C and Python code formatting of unprintable exceptio… #28139
Conversation
…ns and exceptions in the __main__ module.
@@ -169,7 +169,7 @@ def _some_str(value): | |||
try: | |||
return str(value) | |||
except: | |||
return '<unprintable %s object>' % type(value).__name__ | |||
return '<exception str() failed>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The former message contains more information. Would not be better to change other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The information is duplicated because the exception is printed separately.
Thanks @serhiy-storchaka . @pablogsal @ambv do you want to backport this? It’s a very minor thing, but keeping the code aligned to make other back ports easier may be a consideration. |
Too late for 3.10.0 and so I'm inclined to let those backports go and only include this in 3.11. |
…ns and exceptions in the main module.
https://bugs.python.org/issue41031