]> granicus.if.org Git - python/commitdiff
SF bug #1099516: tempfile files not types.FileType
authorRaymond Hettinger <python@rcn.com>
Tue, 11 Jan 2005 15:33:03 +0000 (15:33 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 11 Jan 2005 15:33:03 +0000 (15:33 +0000)
Clarified that the returned object is file-like rather than an actual file.

Lib/tempfile.py

index ae2ed9e63973aff60aa1f54f53f380a2a20891c0..dd7e8643e694d938e09a7ef628c7459c0a49ddd7 100644 (file)
@@ -414,9 +414,9 @@ def NamedTemporaryFile(mode='w+b', bufsize=-1, suffix="",
     'bufsize' -- the buffer size argument to os.fdopen (default -1).
     The file is created as mkstemp() would do it.
 
-    Returns a file object; the name of the file is accessible as
-    file.name.  The file will be automatically deleted when it is
-    closed.
+    Returns an object with a file-like interface; the name of the file
+    is accessible as file.name.  The file will be automatically deleted
+    when it is closed.
     """
 
     if dir is None:
@@ -451,8 +451,8 @@ else:
         'bufsize' -- the buffer size argument to os.fdopen (default -1).
         The file is created as mkstemp() would do it.
 
-        Returns a file object.  The file has no name, and will cease to
-        exist when it is closed.
+        Returns an object with a file-like interface.  The file has no
+        name, and will cease to exist when it is closed.
         """
 
         if dir is None: