two edits

This commit is contained in:
Benjamin Peterson 2009-05-12 20:58:26 +00:00
parent 4199d603fe
commit 12f29ffb9f
1 changed files with 2 additions and 2 deletions

View File

@ -784,8 +784,8 @@ always available.
The standard streams are in text mode by default. To write or read binary The standard streams are in text mode by default. To write or read binary
data to these, use the underlying binary buffer. For example, to write bytes data to these, use the underlying binary buffer. For example, to write bytes
to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``. Using to :data:`stdout`, use ``sys.stdout.buffer.write(b'abc')``. Using
:meth:`io.TextIOWrapper.detach` streams can be made binary by default. For :meth:`io.TextIOBase.detach` streams can be made binary by default. For
example, this function sets all the standard streams to binary: :: example, this function sets all the standard streams to binary::
def make_streams_binary(): def make_streams_binary():
sys.stdin = sys.stdin.detach() sys.stdin = sys.stdin.detach()