Ben Finney added the comment:

On 01-May-2017, Serhiy Storchaka wrote:

> tempfile.mktemp() is not much more useful that just a function that
> generates some names which unlikely matches the names of existing
> files the directory.

Yes. That is already useful enough to be in the standard library, and
it is there.

It is also maintained and implemented in one place, behind an
unpublished API (by using ‘next(tempfile._get_candidate_names())’).

Don't get distracted by the way ‘tempfile.mktemp’ creates files;
that's irrelevant to this issue. None of the use cases presented here
care at all about the file created, and never use that file. They
*only* want the name, generated by that standard-library algorithm.

The proposal in this issue is to have a public standard library API,
which I'm calling ‘tempfile.makepath’, to access that existing
maintained standard-library functionality.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26362>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to