]> granicus.if.org Git - python/commitdiff
At Jim Fulton's request, increase the maxstring value of _saferepr to
authorGuido van Rossum <guido@python.org>
Tue, 10 Sep 2002 21:57:14 +0000 (21:57 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 10 Sep 2002 21:57:14 +0000 (21:57 +0000)
a more reasonable value.

Backport candidate.

Lib/pdb.py

index 2a8a9e3fd568794aa058005f433fadea74f4868c..4b0516d28aefa4d0c706c9cb25d36a5d0906c87f 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"]