David Harrison wrote:
2008/4/29 "Martin v. Löwis" <[EMAIL PROTECTED]>:
Same here. In fact, is there a good reason to have mkstemp() return the
 > fd (except backward compatibility)?

 Except for backwards compatibility: is there a good reason to keep
 os.mkstemp at all?

Greg Ewing's use-case is one I've also had at times - ie. as a
convenience function for creating a "somewhat temporary" file that is
randomly named, but persists beyond the closing of the file.  If the
function doesn't stay in os it doesn't make any difference to me
though :-)

As of 2.6, Greg's use case is addressed by the new 'delete' parameter on tempfile.NamedTemporaryFile.

The implementation of the tempfile module uses os.mkstemp() though, so getting rid of the latter might cause a few problems :)

Cheers,
Nick.

--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
            http://www.boredomandlaziness.org
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to