[ python-Bugs-922922 ] tempfile.mkstemp() documentation discrepancy

SourceForge.net noreply at sourceforge.net
Fri Mar 26 13:47:16 EST 2004


Bugs item #922922, was opened at 2004-03-25 01:06
Message generated for change (Comment added) made by mondragon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=922922&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael S. Fischer (otterley)
Assigned to: Nobody/Anonymous (nobody)
Summary: tempfile.mkstemp() documentation discrepancy

Initial Comment:
The documentation for tempfile.mkstemp() at 
http://www.python.org/doc/2.3.3/lib/module-
tempfile.html (as well as the ActivePython 
documentation that ships with the Windows 2.3 build) 
says:

"mkstemp() returns a tuple containing an OS-level 
handle to an open file (as would be returned by os.open
()) and the absolute pathname of that file, in that order."

However, whenever I use it, it returns a tuple containing 
an integer (presumably the file descriptor) and the 
absolute pathname of the tempfile.  No file handle is 
returned.  

Sure enough, the in-line documentation states:

"The return value is a pair (fd, name) where fd is the file 
descriptor returned by os.open, and name is the 
filename."

Could someone please correct this discrepancy?


----------------------------------------------------------------------

>Comment By: Nick Bastin (mondragon)
Date: 2004-03-26 13:47

Message:
Logged In: YES 
user_id=430343

As noted in the os.open() documentation, it returns a
file descriptor, which seems to make the mkstemp()
documentation perfectly reasonable (and correct).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=922922&group_id=5470



More information about the Python-bugs-list mailing list