Skip to content

Commit ad17bc0

Browse files
committed
#17271: update example in tempfile docs.
1 parent a19ebdb commit ad17bc0

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Doc/library/tempfile.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,10 @@ The module defines the following user-callable items:
179179
``delete=False`` parameter::
180180

181181
>>> f = NamedTemporaryFile(delete=False)
182-
>>> f
183-
<open file '<fdopen>', mode 'w+b' at 0x384698>
184182
>>> f.name
185-
'/var/folders/5q/5qTPn6xq2RaWqk+1Ytw3-U+++TI/-Tmp-/tmpG7V1Y0'
186-
>>> f.write("Hello World!\n")
183+
'/tmp/tmptjujjt'
184+
>>> f.write(b"Hello World!\n")
185+
13
187186
>>> f.close()
188187
>>> os.unlink(f.name)
189188
>>> os.path.exists(f.name)

0 commit comments

Comments
 (0)