From: Serhiy Storchaka Date: Sat, 9 Feb 2013 09:47:20 +0000 (+0200) Subject: Issue #17147. Mention BytesIO in SpooledTemporaryFile documentation. X-Git-Tag: v3.3.1rc1~205 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23a6726bc849be613c02b76815f26cc75cf4789c;p=thirdparty%2FPython%2Fcpython.git Issue #17147. Mention BytesIO in SpooledTemporaryFile documentation. --- 23a6726bc849be613c02b76815f26cc75cf4789c diff --cc Doc/library/tempfile.rst index 96ead1fb89dc,b68a412383b8..b97603f836bd --- a/Doc/library/tempfile.rst +++ b/Doc/library/tempfile.rst @@@ -82,13 -83,12 +82,15 @@@ The module defines the following user-c causes the file to roll over to an on-disk file regardless of its size. The returned object is a file-like object whose :attr:`_file` attribute - is either a :class:`StringIO` object or a true file object, depending on - whether :func:`rollover` has been called. This file-like object can be - used in a :keyword:`with` statement, just like a normal file. + is either a :class:`BytesIO` or :class:`StringIO` object (depending on + whether specifies binary or text *mode* was specified) or a true file + object, depending on whether :func:`rollover` has been called. This + file-like object can be used in a :keyword:`with` statement, just like + a normal file. + .. versionchanged:: 3.3 + the truncate method now accepts a ``size`` argument. + .. function:: TemporaryDirectory(suffix='', prefix='tmp', dir=None)