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 sjmachin
Recipients georg.brandl, jaywalker, jdwhitley, pitrou, sjmachin, skip.montanaro, vstinner
Date 2009-03-09.06:02:11
SpamBayes Score 1.5306594e-05
Marked as misclassified No
Message-id <1236578536.52.0.795400385325.issue4847@psf.upfronthosting.co.za>
In-reply-to
Content
Before patching, could we discuss the requirements?

There are two different concepts:
(1) "text" file (assume that CR and/or LF are line terminators, and
provide methods for accessing a line at a time) versus "binary" file (no
such assumptions, no such access)
(2) reading the file as a raw undecoded "bytes" file or as a decoded
"str" file.

Options for 3.X:
(1) caller uses mode 'rb', is given bytes objects back.
(2) caller uses mode 'rt' and provides an encoding, is given str objects
back.
IMPORTANT: Option 2 must NOT not read the file as a collection of
"lines"; it must process it (conceptually at least) a character at a
time so that embedded CR and/or LF are not taken to be row terminators.

Following the line that 3.X line should do what's best, not what we used
to do, the implication is that we choose option 2.
History
Date User Action Args
2009-03-09 06:02:20sjmachinsetrecipients: + sjmachin, skip.montanaro, georg.brandl, pitrou, vstinner, jaywalker, jdwhitley
2009-03-09 06:02:16sjmachinsetmessageid: <1236578536.52.0.795400385325.issue4847@psf.upfronthosting.co.za>
2009-03-09 06:02:14sjmachinlinkissue4847 messages
2009-03-09 06:02:11sjmachincreate