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 amaury.forgeotdarc
Recipients amaury.forgeotdarc, lemburg, shamilbi
Date 2009-11-04.18:02:06
SpamBayes Score 1.50993e-08
Marked as misclassified No
Message-id <>
The docs say::
  Files are always opened in binary mode, even if no binary mode was
  specified. This is done to avoid data loss due to encodings using
  8-bit values. This means that no automatic conversion of '\n' is done
  on reading and writing.

But this does not match the code of
    if encoding is not None and \
       'b' not in mode:
        # Force opening of the file in binary mode
        mode = mode + 'b'

When the encoding is None, the file is opened in text mode.
Marc-Andre, what do you think? is it a documentation bug instead?
Date User Action Args
2009-11-04 18:02:09amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, lemburg, shamilbi
2009-11-04 18:02:09amaury.forgeotdarcsetmessageid: <>
2009-11-04 18:02:07amaury.forgeotdarclinkissue7262 messages
2009-11-04 18:02:06amaury.forgeotdarccreate