Skip to content

Commit a54c1f4

Browse files
Reorganize output buffering description in functions.rst
Reformat output buffering explanation for clarity.
1 parent 710f49a commit a54c1f4

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
@@ -1611,8 +1611,8 @@ are always available. They are listed here in alphabetical order.
16111611
arguments are converted to text strings, :func:`print` cannot be used with
16121612
binary mode file objects. For these, use ``file.write(...)`` instead.
16131613

1614-
Output buffering is usually determined by *file*.
1615-
However, if *flush* is true, the stream is forcibly flushed.
1614+
Output buffering is usually determined by *file*. However, if *flush* is
1615+
true, the stream is forcibly flushed.
16161616

16171617
.. note::
16181618

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

16351635
.. code-block:: python
16361636
from time import sleep
1637+
# This call performs one write operation, so the newline inside the string
1638+
# does not trigger an immediate flush by itself.
16371639
print("Hello\nWorld")
16381640
sleep(3)
16391641
print("Hi there!")

0 commit comments

Comments
 (0)