Skip to content

Commit 72a8ca7

Browse files
Fix formatting and indentation in functions.rst
1 parent e7b2c69 commit 72a8ca7

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
@@ -1607,29 +1607,29 @@ are always available. They are listed here in alphabetical order.
16071607
Output buffering is usually determined by *file*.
16081608
However, if *flush* is true, the stream is forcibly flushed.
16091609

1610-
.. note::
1610+
.. note::
16111611

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

1617-
- When stdout is connected to a terminal (TTY), output is line-buffered and
1618-
typically flushes after the write completes.
1619-
- When stdout is redirected to a file or pipe, output may be fully buffered and
1620-
not flush until the buffer fills or flush is requested.
1617+
- When stdout is connected to a terminal (TTY), output is line-buffered and
1618+
typically flushes after the write completes.
1619+
- When stdout is redirected to a file or pipe, output may be fully buffered and
1620+
not flush until the buffer fills or flush is requested.
16211621

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

1626-
Example:
1626+
Example:
16271627

1628-
.. code-block:: python
1629-
from time import sleep
1630-
print("Hello\nWorld")
1631-
sleep(3)
1632-
print("Hi there!")
1628+
.. code-block:: python
1629+
from time import sleep
1630+
print("Hello\nWorld")
1631+
sleep(3)
1632+
print("Hi there!")
16331633
16341634
.. versionchanged:: 3.3
16351635
Added the *flush* keyword argument.

0 commit comments

Comments
 (0)