A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-April/078942.html below:

[Python-Dev] Warn about mktemp once again?

[Python-Dev] Warn about mktemp once again? [Python-Dev] Warn about mktemp once again?Nick Coghlan ncoghlan at gmail.com
Tue Apr 29 14:18:16 CEST 2008
David Harrison wrote:
> 2008/4/29 "Martin v. Löwis" <martin at v.loewis.de>:
>>> 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   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4