Commit cf4d6997 authored by Terry Jan Reedy's avatar Terry Jan Reedy

Merge with 3.4

parents f7b2aa51 1895f2b5
......@@ -1083,8 +1083,8 @@ are always available. They are listed here in alphabetical order.
.. function:: print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False)
Print *objects* to the stream *file*, separated by *sep* and followed by
*end*. *sep*, *end* and *file*, if present, must be given as keyword
Print *objects* to the text stream *file*, separated by *sep* and followed
by *end*. *sep*, *end* and *file*, if present, must be given as keyword
arguments.
All non-keyword arguments are converted to strings like :func:`str` does and
......@@ -1094,9 +1094,12 @@ are always available. They are listed here in alphabetical order.
*end*.
The *file* argument must be an object with a ``write(string)`` method; if it
is not present or ``None``, :data:`sys.stdout` will be used. Whether output
is buffered is usually determined by *file*, but if the *flush* keyword
argument is true, the stream is forcibly flushed.
is not present or ``None``, :data:`sys.stdout` will be used. Since printed
arguments are converted to text strings, :func:`print` cannot be used with
binary mode file objects. For these, use ``file.write(...)`` instead.
Whether output is buffered is usually determined by *file*, but if the
*flush* keyword argument is true, the stream is forcibly flushed.
.. versionchanged:: 3.3
Added the *flush* keyword argument.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment