Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
23686074
Commit
23686074
authored
Feb 05, 2014
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#14515: clarify that TemporaryDirectory's __enter__ returns the name.
parent
3b4f1594
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Doc/library/tempfile.rst
Doc/library/tempfile.rst
+6
-4
No files found.
Doc/library/tempfile.rst
View file @
23686074
...
@@ -97,12 +97,14 @@ The module defines the following user-callable items:
...
@@ -97,12 +97,14 @@ The module defines the following user-callable items:
This function creates a temporary directory using :func:`mkdtemp`
This function creates a temporary directory using :func:`mkdtemp`
(the supplied arguments are passed directly to the underlying function).
(the supplied arguments are passed directly to the underlying function).
The resulting object can be used as a context manager (see
The resulting object can be used as a context manager (see
:ref:`context-managers`). On completion of the context
(
or destruction
:ref:`context-managers`). On completion of the context or destruction
of the temporary directory object
),
the newly created temporary directory
of the temporary directory object the newly created temporary directory
and all its contents are removed from the filesystem.
and all its contents are removed from the filesystem.
The directory name can be retrieved from the :attr:`name` attribute
The directory name can be retrieved from the :attr:`name` attribute of the
of the returned object.
returned object. When the returned object is used as a context manager, the
:attr:`name` will be assigned to the target of the :keyword:`as` clause in
the :keyword:`with` statement, if there is one.
The directory can be explicitly cleaned up by calling the
The directory can be explicitly cleaned up by calling the
:func:`cleanup` method.
:func:`cleanup` method.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment