tempfile.TemporaryDirectory().name should return pathlib.Path instead of str

I wonder if a viable alternative would be to take advantage of @barneygale’s great work on extending pathlib, and fit TemporaryDirectory into that class hierarchy such that it retains its current behavior but can be used as a Path as well. Maybe that doesn’t make sense, but it sounds like a satisfying solution :sweat_smile:

1 Like