python bug in this list implementation?
rschroev_nospam_ml at fastmail.fm
Wed Dec 28 17:31:50 CET 2005
Steven D'Aprano wrote:
> On Wed, 28 Dec 2005 15:07:52 +0100, Christoph Zwerschke wrote:
>>Chris is probably working on Windows where it is handy to enter paths as
>>raw strings because of the backslashes. Unusual however, and problematic
>>if you want to use the program on other platforms, is opening a text
>>file in binary mode.
> I've never understood why binary mode is supposed to be bad. By my
> understanding, binary mode simply means that no line endings are
> translated, regardless of whether the file uses \n, \r or a combination of
> the two. Surely the worst that can happen in binary mode is that your
> strings end up having some carriage returns you have to deal with yourself?
Yes. The larger problem is when you don't explicitly use binary mode
while handling binary data on other platforms, and then port it to Windows.
If I have been able to see further, it was only because I stood
on the shoulders of giants. -- Isaac Newton
More information about the Python-list