]> granicus.if.org Git - python/commitdiff
#17271: update example in tempfile docs.
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 22 Feb 2013 06:28:14 +0000 (08:28 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 22 Feb 2013 06:28:14 +0000 (08:28 +0200)
Doc/library/tempfile.rst

index a8323a52a80a641bf4a7ada6e03a66a1f08e82a1..bc1f23a204ac9c5330b8b6697c6d9d2140cd69fe 100644 (file)
@@ -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)