Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove : in AttributeError path
  • Loading branch information
johnslavik committed Feb 7, 2026
commit 03b1f455af72ca0e71fd69f80ae4a2e7777bb4e6
4 changes: 2 additions & 2 deletions Lib/traceback.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,9 +1133,9 @@ def __init__(self, exc_type, exc_value, exc_traceback, *, limit=None,
suggestion = _compute_suggestion_error(exc_value, exc_traceback, wrong_name)
if suggestion:
if suggestion.isascii():
self._str += f". Did you mean: '.{suggestion}' instead of '.{wrong_name}'?"
self._str += f". Did you mean '.{suggestion}' instead of '.{wrong_name}'?"
else:
self._str += f". Did you mean: '.{suggestion}' ({suggestion!a}) instead of '.{wrong_name}'?"
self._str += f". Did you mean '.{suggestion}' ({suggestion!a}) instead of '.{wrong_name}'?"
elif exc_type and issubclass(exc_type, NameError) and \
getattr(exc_value, "name", None) is not None:
wrong_name = getattr(exc_value, "name", None)
Expand Down
Loading