Skip to content

Commit 661aca5

Browse files
Fix formatting and indentation in functions.rst
1 parent eeb8015 commit 661aca5

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Doc/library/functions.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1616,29 +1616,29 @@ are always available. They are listed here in alphabetical order.
16161616
Output buffering is usually determined by *file*.
16171617
However, if *flush* is true, the stream is forcibly flushed.
16181618

1619-
.. note::
1619+
.. note::
16201620

1621-
In Python, printing a string containing newline characters does not automatically
1622-
flush stdout. Python performs buffering at the write/operation level, so newlines
1623-
inside a single write do not necessarily trigger an immediate flush. The exact
1624-
timing of output may vary depending on the environment:
1621+
In Python, printing a string containing newline characters does not automatically
1622+
flush stdout. Python performs buffering at the write/operation level, so newlines
1623+
inside a single write do not necessarily trigger an immediate flush. The exact
1624+
timing of output may vary depending on the environment:
16251625

1626-
- When stdout is connected to a terminal (TTY), output is line-buffered and
1627-
typically flushes after the write completes.
1628-
- When stdout is redirected to a file or pipe, output may be fully buffered and
1629-
not flush until the buffer fills or flush is requested.
1626+
- When stdout is connected to a terminal (TTY), output is line-buffered and
1627+
typically flushes after the write completes.
1628+
- When stdout is redirected to a file or pipe, output may be fully buffered and
1629+
not flush until the buffer fills or flush is requested.
16301630

1631-
For guaranteed immediate output, use ``flush=True`` or call
1632-
``sys.stdout.flush()`` explicitly. Running Python with the ``-u`` flag also
1633-
forces unbuffered output, which may be useful in scripts requiring immediate writes.
1631+
For guaranteed immediate output, use ``flush=True`` or call
1632+
``sys.stdout.flush()`` explicitly. Running Python with the ``-u`` flag also
1633+
forces unbuffered output, which may be useful in scripts requiring immediate writes.
16341634

1635-
Example:
1635+
Example:
16361636

1637-
.. code-block:: python
1638-
from time import sleep
1639-
print("Hello\nWorld")
1640-
sleep(3)
1641-
print("Hi there!")
1637+
.. code-block:: python
1638+
from time import sleep
1639+
print("Hello\nWorld")
1640+
sleep(3)
1641+
print("Hi there!")
16421642
16431643
.. versionchanged:: 3.3
16441644
Added the *flush* keyword argument.

0 commit comments

Comments
 (0)