]> granicus.if.org Git - python/commitdiff
Clarify the effect of text mode.
authorGeorg Brandl <georg@python.org>
Sun, 13 Jan 2008 09:36:18 +0000 (09:36 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 13 Jan 2008 09:36:18 +0000 (09:36 +0000)
Doc/library/functions.rst

index 622ff5f443b6048299226c130bee4a05e691ab55..665b8657124b887bf37070f807103d1dd0b3b519 100644 (file)
@@ -734,7 +734,9 @@ available.  They are listed here in alphabetical order.
    writing (truncating the file if it already exists), and ``'a'`` for appending
    (which on *some* Unix systems means that *all* writes append to the end of the
    file regardless of the current seek position).  If *mode* is omitted, it
-   defaults to ``'r'``.  When opening a binary file, you should append ``'b'`` to
+   defaults to ``'r'``.  The default is to use text mode, which may convert
+   ``'\n'`` characters to a platform-specific representation on writing and back
+   on reading.  Thus, when opening a binary file, you should append ``'b'`` to
    the *mode* value to open the file in binary mode, which will improve
    portability.  (Appending ``'b'`` is useful even on systems that don't treat
    binary and text files differently, where it serves as documentation.)  See below