Bugs item #922922, was opened at 2004-03-25 06:06
Message generated for change (Tracker Item Submitted) made by Item Submitter
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?
----------------------------------------------------------------------