SF bug #1099516: tempfile files not types.FileType

Clarified that the returned object is file-like rather than an actual file.
This commit is contained in:
Raymond Hettinger 2005-01-11 15:33:03 +00:00
parent e4d05c4f93
commit faa10ebdd0
1 changed files with 5 additions and 5 deletions

View File

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