Antoine Pitrou added the comment: Given the following property of TemporaryFile:
"Under Unix, the directory entry for the file is removed immediately after the file is created. Other platforms do not support this; your code should not rely on a temporary file created using this function having or not having a visible name in the file system." (from http://docs.python.org/dev/library/tempfile.html#tempfile.TemporaryFile) I find it absurd to expect the name attribute to return an actual filename, since it won't exist anymore by the time you use it (under Unix, at least). So, we could return an invalid filename, but I don't see the point, and the current behaviour is as good as any other. If you want a usable name, by definition you must use NamedTemporaryFile. Recommend closing. ---------- nosy: +georg.brandl, ncoghlan resolution: -> rejected _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17895> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com