GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — gh-132385: Fix instance error suggestions potential exceptions in `traceback` by sobolevn · Pull Request #132387 · python/cpython Conversation
|
| if hasattr(self, wrong_name): | ||
| try: | ||
| has_wrong_name = hasattr(self, wrong_name) | ||
| except BaseException: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This can swallow things like KeyboardInterrupt and MemoryError. We shouldn't do that.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Then Exception only?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Would that catch SystemExit?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No :)
>>> SystemExit.__mro__ (<class 'SystemExit'>, <class 'BaseException'>, <class 'object'>)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
After this change: 2025-04-11.13.45.38.mov |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@iritkatriel thank you! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…eptions in `traceback` (pythonGH-132387) (cherry picked from commit 641253c) Co-authored-by: sobolevn <[email protected]>
|
GH-133297 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…eptions in `traceback` (python#132387)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.