]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport gvanrossum's checkin of
authorMichael W. Hudson <mwh@python.net>
Tue, 24 Sep 2002 11:19:33 +0000 (11:19 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 24 Sep 2002 11:19:33 +0000 (11:19 +0000)
    revision 1.57 of pdb.py

date: 2002/09/10 21:57:14;  author: gvanrossum;  state: Exp;  lines: +7 -1
At Jim Fulton's request, increase the maxstring value of _saferepr to
a more reasonable value.

Backport candidate.

Lib/pdb.py

index 246c6da97ce597a7b553b5b31cfec3e9ecdb69f4..1f3c1d47eee7dc90e121f3c279ea2680f8c8f9a6 100755 (executable)
@@ -8,10 +8,16 @@ import sys
 import linecache
 import cmd
 import bdb
-from repr import repr as _saferepr
+from repr import Repr
 import os
 import re
 
+# Create a custom safe Repr instance and increase its maxstring.
+# The default of 30 truncates error messages too easily.
+_repr = Repr()
+_repr.maxstring = 200
+_saferepr = _repr.repr
+
 __all__ = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace",
            "post_mortem", "help"]