Skip to content

Commit 871aaa1

Browse files
Reorganize output buffering description in functions.rst
Reformat output buffering explanation for clarity.
1 parent 76e48de commit 871aaa1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/library/functions.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,8 +1602,8 @@ are always available. They are listed here in alphabetical order.
16021602
arguments are converted to text strings, :func:`print` cannot be used with
16031603
binary mode file objects. For these, use ``file.write(...)`` instead.
16041604

1605-
Output buffering is usually determined by *file*.
1606-
However, if *flush* is true, the stream is forcibly flushed.
1605+
Output buffering is usually determined by *file*. However, if *flush* is
1606+
true, the stream is forcibly flushed.
16071607

16081608
.. note::
16091609

@@ -1625,6 +1625,8 @@ are always available. They are listed here in alphabetical order.
16251625

16261626
.. code-block:: python
16271627
from time import sleep
1628+
# This call performs one write operation, so the newline inside the string
1629+
# does not trigger an immediate flush by itself.
16281630
print("Hello\nWorld")
16291631
sleep(3)
16301632
print("Hi there!")

0 commit comments

Comments
 (0)