This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jsf80238@gmail.com
Recipients docs@python, jsf80238@gmail.com
Date 2013-02-22.05:55:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361512523.63.0.313343662334.issue17271@psf.upfronthosting.co.za>
In-reply-to
Content
Page is http://docs.python.org/3/library/tempfile.html#module-tempfile.

The code in question currently reads:
>>> 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")
>>> f.close()
>>> os.unlink(f.name)
>>> os.path.exists(f.name)
False

It should read:
>>> import os
>>> from tempfile import NamedTemporaryFile
>>> f = NamedTemporaryFile(delete=False)
>>> f
<tempfile._TemporaryFileWrapper object at 0x29bfc50>
>>> f.name
'/tmp/tmpdxd_85'
>>> f.write("Hello World!\n".encode())
13
>>> f.close()
>>> os.unlink(f.name)
>>> os.path.exists(f.name)
False
History
Date User Action Args
2013-02-22 05:55:23jsf80238@gmail.comsetrecipients: + jsf80238@gmail.com, docs@python
2013-02-22 05:55:23jsf80238@gmail.comsetmessageid: <1361512523.63.0.313343662334.issue17271@psf.upfronthosting.co.za>
2013-02-22 05:55:23jsf80238@gmail.comlinkissue17271 messages
2013-02-22 05:55:23jsf80238@gmail.comcreate