]> granicus.if.org Git - python/commitdiff
Issue #17147. Mention BytesIO in SpooledTemporaryFile documentation.
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 9 Feb 2013 09:47:20 +0000 (11:47 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 9 Feb 2013 09:47:20 +0000 (11:47 +0200)
1  2 
Doc/library/tempfile.rst
Lib/tempfile.py

index 96ead1fb89dc22b929ac257641f169f8847846ef,b68a412383b88fe10bad7b1676828b55ae09a938..b97603f836bd6c6608db3c374c30232361c41825
@@@ -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)
  
diff --cc Lib/tempfile.py
Simple merge