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
Add the syntax error message to output
  • Loading branch information
gaogaotiantian committed Mar 26, 2023
commit b73669728691cc19f66b263b599cd094d43c6310
2 changes: 1 addition & 1 deletion Lib/pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ def do_display(self, arg):
else:
val, exc = self._getval_except(arg)
if isinstance(exc, SyntaxError):
self.message(f'Unable to display "{arg}": SyntaxError')
self.message('Unable to display %s: %r' % (arg, val))
else:
self.displaying.setdefault(self.curframe, {})[arg] = val
self.message('display %s: %r' % (arg, val))
Expand Down