R. David Murray added the comment: There is at least one other place (do_break) where this same problem could crop up. Unittest handles this by having a 'safe_repr' function. pdb doesn't need the same function unittest does, but it could do something similar, and then use %s and this function in the places where it currently uses repr to print an arbitrary object:
def safe_repr(obj): try: return repr(obj) except Exception: return object.__repr__(obj) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20853> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com