Skip to content

Commit

Permalink
Add docstrings to TempDir class
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed May 24, 2020
1 parent ed6533e commit 71190e6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions path/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1610,12 +1610,16 @@ class TempDir(Path):
constructed with the same parameters that you can use
as a context manager.
Example::
For example:
with TempDir() as d:
# do stuff with the Path object "d"
>>> with TempDir() as d:
... d.isdir() and isinstance(d, Path)
True
The directory is deleted automatically.
# here the directory is deleted automatically
>>> d.isdir()
False
.. seealso:: :func:`tempfile.mkdtemp`
"""
Expand Down

0 comments on commit 71190e6

Please sign in to comment.