Re: Yet ANOTHER of Steve's File Objects ( lazy readlines methods )
Steven D. Majewski (sdm7g@elvis.med.Virginia.EDU)
Thu, 31 Mar 1994 21:58:59 GMT
In article <CnJtty.K5C@murdoch.acc.virginia.edu>,
Steven D. Majewski <sdm7g@elvis.med.Virginia.EDU> wrote:
>#
># This class is dedicated to Tommy Burnett - whose comments
># about whether Python is really Class based inspired this method.
>#
Oops!
import string
import comp
misspelled = 'Burnett'
for line in comp.lang.python.readlines():
fields = string.strinp( line )
if misspelled in fields :
i = fields.index( misspelled )
fields[i] = fields[i] + 'e'
comp.lang.python.write( string.join( fields ) )
- Steve M.