[Python-checkins] CVS: python/dist/src/Lib multifile.py,1.15,1.16
Eric S. Raymond
esr@users.sourceforge.net
Fri, 09 Feb 2001 08:52:58 -0800
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv4950
Modified Files:
multifile.py
Log Message:
String method conversion.
Index: multifile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/multifile.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** multifile.py 2001/02/06 01:07:01 1.15
--- multifile.py 2001/02/09 16:52:55 1.16
***************
*** 29,33 ****
import sys
- import string
__all__ = ["MultiFile","Error"]
--- 29,32 ----
***************
*** 89,96 ****
else:
# Ignore trailing whitespace on marker lines
! k = len(line) - 1
! while line[k] in string.whitespace:
! k = k - 1
! marker = line[:k+1]
# No? OK, try to match a boundary.
# Return the line (unstripped) if we don't.
--- 88,92 ----
else:
# Ignore trailing whitespace on marker lines
! marker = line.rstrip()
# No? OK, try to match a boundary.
# Return the line (unstripped) if we don't.
***************
*** 122,126 ****
def read(self): # Note: no size argument -- read until EOF only!
! return string.joinfields(self.readlines(), '')
def next(self):
--- 118,122 ----
def read(self): # Note: no size argument -- read until EOF only!
! return self.readlines().join('')
def next(self):