[Python-checkins] python/dist/src/Lib pdb.py,1.51.24.2,1.51.24.3

mwh@users.sourceforge.net mwh@users.sourceforge.net
2002年9月24日 04:19:35 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv4695
Modified Files:
 Tag: release22-maint
	pdb.py 
Log Message:
backport gvanrossum's checkin of
 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.
Index: pdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pdb.py,v
retrieving revision 1.51.24.2
retrieving revision 1.51.24.3
diff -C2 -d -r1.51.24.2 -r1.51.24.3
*** pdb.py	23 Aug 2002 15:42:27 -0000	1.51.24.2
--- pdb.py	24 Sep 2002 11:19:33 -0000	1.51.24.3
***************
*** 9,15 ****
 import cmd
 import bdb
! from repr import repr as _saferepr
 import os
 import re
 
 __all__ = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace",
--- 9,21 ----
 import cmd
 import bdb
! 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",

AltStyle によって変換されたページ (->オリジナル) /