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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23a6726bc849be613c02b76815f26cc75cf4789c;p=python Issue #17147. Mention BytesIO in SpooledTemporaryFile documentation. --- 23a6726bc849be613c02b76815f26cc75cf4789c diff --cc Doc/library/tempfile.rst index 96ead1fb89,b68a412383..b97603f836 --- 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)