diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-22 06:28:14 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-02-22 06:28:14 (GMT) |
commit | ad17bc0bf971348fd49970a305094b3186b4b679 (patch) | |
tree | 720f989086e65c7943f2289d880cca7e2a86d838 /Doc/library | |
parent | a19ebdb44a2a3f7f324976f9b37dd913b1e8bb28 (diff) | |
download | cpython-ad17bc0bf971348fd49970a305094b3186b4b679.zip cpython-ad17bc0bf971348fd49970a305094b3186b4b679.tar.gz cpython-ad17bc0bf971348fd49970a305094b3186b4b679.tar.bz2 |
#17271: update example in tempfile docs.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/tempfile.rst | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst index a8323a5..bc1f23a 100644 --- a/Doc/library/tempfile.rst +++ b/Doc/library/tempfile.rst @@ -179,11 +179,10 @@ The module defines the following user-callable items: ``delete=False`` parameter:: >>> f = NamedTemporaryFile(delete=False) - >>> f - <open file '<fdopen>', mode 'w+b' at 0x384698> >>> f.name - '/var/folders/5q/5qTPn6xq2RaWqk+1Ytw3-U+++TI/-Tmp-/tmpG7V1Y0' - >>> f.write("Hello World!\n") + '/tmp/tmptjujjt' + >>> f.write(b"Hello World!\n") + 13 >>> f.close() >>> os.unlink(f.name) >>> os.path.exists(f.name) |