[Python-checkins] CVS: python/dist/src/Lib traceback.py,1.20,1.21
Eric S. Raymond
esr@users.sourceforge.net
Fri, 09 Feb 2001 16:22:35 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv25187
Modified Files:
traceback.py
Log Message:
String method cleanup.
Index: traceback.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/traceback.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** traceback.py 2001/02/09 09:37:32 1.20
--- traceback.py 2001/02/10 00:22:33 1.21
***************
*** 2,6 ****
import linecache
- import string
import sys
import types
--- 2,5 ----
***************
*** 155,165 ****
(filename, lineno))
i = 0
! while i < len(line) and \
! line[i] in string.whitespace:
i = i+1
list.append(' %s\n' % line.strip())
s = ' '
for c in line[i:offset-1]:
! if c in string.whitespace:
s = s + c
else:
--- 154,163 ----
(filename, lineno))
i = 0
! while i < len(line) and line[i].isspace():
i = i+1
list.append(' %s\n' % line.strip())
s = ' '
for c in line[i:offset-1]:
! if c.isspace():
s = s + c
else: