]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-59254: mention in open() doc that line buffering is for writing (GH-112318...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 24 Nov 2023 18:15:42 +0000 (19:15 +0100)
committerGitHub <noreply@github.com>
Fri, 24 Nov 2023 18:15:42 +0000 (18:15 +0000)
gh-59254: mention in open() doc that line buffering is for writing (GH-112318)
(cherry picked from commit fafae08cc7caa25f2bd6b29106b50ef76c3e296f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Doc/library/functions.rst

index c287f52156ba63916f3db711997f0c95c58fa613..0e5f36f57daf1765d4374bbb7019e121376dba49 100644 (file)
@@ -1220,7 +1220,7 @@ are always available.  They are listed here in alphabetical order.
 
    *buffering* is an optional integer used to set the buffering policy.  Pass 0
    to switch buffering off (only allowed in binary mode), 1 to select line
-   buffering (only usable in text mode), and an integer > 1 to indicate the size
+   buffering (only usable when writing in text mode), and an integer > 1 to indicate the size
    in bytes of a fixed-size chunk buffer. Note that specifying a buffer size this
    way applies for binary buffered I/O, but ``TextIOWrapper`` (i.e., files opened
    with ``mode='r+'``) would have another buffering. To disable buffering in