Does mkstemp open files only if they don't already exist?

Steven D'Aprano steve at pearwood.info
Tue Sep 1 10:45:00 EDT 2015


I assume the answer is "Yes", but is it safe to expect that
tempfile.mkstemp() will only create a file that doesn't already exist? I
presume that there's no chance of it over-writing an existing file (say,
due to a race-condition).


-- 
Steven




More information about the Python-list mailing list