From: Ezio Melotti Date: Fri, 22 Feb 2013 06:28:14 +0000 (+0200) Subject: #17271: update example in tempfile docs. X-Git-Tag: v3.2.4rc1~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad17bc0bf971348fd49970a305094b3186b4b679;p=python #17271: update example in tempfile docs. --- diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst index a8323a52a8..bc1f23a204 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 - ', 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)