@@ -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\n World" )
1631- sleep(3 )
1632- print (" Hi there!" )
1628+ .. code-block :: python
1629+ from time import sleep
1630+ print (" Hello\n World" )
1631+ sleep(3 )
1632+ print (" Hi there!" )
16331633
16341634 .. versionchanged :: 3.3
16351635 Added the *flush * keyword argument.
0 commit comments