BIG problem if readline strips newlines
Aahz Maruch
aahz at panix.com
Tue Jun 12 16:42:20 EDT 2001
In article <rFrV6.136199$mu1.27715065 at typhoon.we.rr.com>,
Pete Shinners <shredwheat at mediaone.net> wrote:
>
>i've seen frequent mention of an option for readline() to strip out
>newlines as each string is read. this sounds like a great idea, but i
>realized its gonna be very difficult to loop through a text file. the
>standard python idioms will no longer work...
>
>for line in file.readlines(chomp=1):
> pass
Um. Think again? Why wouldn't this work?
--
--- Aahz <*> (Copyright 2001 by aahz at pobox.com)
Hugs and backrubs -- I break Rule 6 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista
gfarber: Thank God, or the belief system of your choice.
pddb: Does human perversity count as a belief system?
More information about the Python-list
mailing list