This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients benjamin.peterson, facundobatista, georg.brandl, ncoghlan, nessus42, pitrou, r.david.murray, rhettinger
Date 2009-05-15.11:46:53
SpamBayes Score 4.4575454e-14
Marked as misclassified No
Message-id <1242388014.59.0.430003269127.issue1152248@psf.upfronthosting.co.za>
In-reply-to
Content
I agree with Antoine - given that the newlines parameter now deals with
Skip's alternate line separator use case, a new method "readrecords"
that takes a mandatory record separator makes more sense than using
readlines to read things that are not lines. (of course, taking the
alternate line ending use case away also reduces the total number of use
cases for the new method).

Note that the problem with the read()+split() approach is that you
either have to read the whole file into memory (which this RFE is trying
to avoid) or you have to do your own buffering and so forth to split
records as you go. Since the latter is both difficult to get right and
very similar to what the IO module already has to do for readlines(), it
makes sense to include the extra complexity there.
History
Date User Action Args
2009-05-15 11:47:10ncoghlanunlinkissue1152248 messages
2009-05-15 11:46:55ncoghlansetrecipients: + ncoghlan, georg.brandl, rhettinger, facundobatista, pitrou, benjamin.peterson, nessus42, r.david.murray
2009-05-15 11:46:54ncoghlansetmessageid: <1242388014.59.0.430003269127.issue1152248@psf.upfronthosting.co.za>
2009-05-15 11:46:53ncoghlanlinkissue1152248 messages
2009-05-15 11:46:53ncoghlancreate