mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Copied two versions of the example from the interactive session. Delete
one.
This commit is contained in:
parent
7595c1a36b
commit
79964cf64f
1 changed files with 0 additions and 5 deletions
|
@ -170,11 +170,6 @@ The module defines the following user-callable functions:
|
|||
:func:`mktemp` usage can be replaced easily with
|
||||
:func:`NamedTemporaryFile`, passing it the `delete=False` parameter::
|
||||
|
||||
>>> f = NamedTemporaryFile(delete=False)
|
||||
>>> print f.name
|
||||
>>> f.write("Hello World!\n")
|
||||
>>> f.close()
|
||||
>>> os.unlink(f.name)
|
||||
>>> f = NamedTemporaryFile(delete=False)
|
||||
>>> f
|
||||
<open file '<fdopen>', mode 'w+b' at 0x384698>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue