Commit 9e9ded63 authored by Ezio Melotti's avatar Ezio Melotti

#17271: update example in tempfile docs.

parent c7629220
...@@ -179,11 +179,10 @@ The module defines the following user-callable items: ...@@ -179,11 +179,10 @@ The module defines the following user-callable items:
``delete=False`` parameter:: ``delete=False`` parameter::
>>> f = NamedTemporaryFile(delete=False) >>> f = NamedTemporaryFile(delete=False)
>>> f
<open file '<fdopen>', mode 'w+b' at 0x384698>
>>> f.name >>> f.name
'/var/folders/5q/5qTPn6xq2RaWqk+1Ytw3-U+++TI/-Tmp-/tmpG7V1Y0' '/tmp/tmptjujjt'
>>> f.write("Hello World!\n") >>> f.write(b"Hello World!\n")
13
>>> f.close() >>> f.close()
>>> os.unlink(f.name) >>> os.unlink(f.name)
>>> os.path.exists(f.name) >>> os.path.exists(f.name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment