This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Pat Gunn
Recipients Pat Gunn
Date 2019-09-26.16:29:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569515390.19.0.594047788095.issue38287@roundup.psfhosted.org>
In-reply-to
Content
Right now, when tempfile.TemporaryDirectory() is used as a context manager, the context variable is stringy, usable as a string containing the directory name it made. When used directly, it returns an object that does not coerce to a nice string, instead requiring the .name method to be called.

I propose adding a __str__() to the class that causes it to serialise nicely into a string containing just the directory name, so the (in my view surprising) differences in behaviour are minimised.
History
Date User Action Args
2019-09-26 16:29:50Pat Gunnsetrecipients: + Pat Gunn
2019-09-26 16:29:50Pat Gunnsetmessageid: <1569515390.19.0.594047788095.issue38287@roundup.psfhosted.org>
2019-09-26 16:29:50Pat Gunnlinkissue38287 messages
2019-09-26 16:29:49Pat Gunncreate