summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2013-02-23 18:24:08 (GMT)
committerPetri Lehtinen <petri@digip.org>2013-02-23 18:24:31 (GMT)
commit0b785036ef5482e55360b73df2176d672c97edaf (patch)
treeebc12b63336943b7e9e27d26762a09ebb1e18175 /Doc/tutorial
parent9e14755b46c48207b44be92093ca2eae6ba22fac (diff)
downloadcpython-0b785036ef5482e55360b73df2176d672c97edaf.zip
cpython-0b785036ef5482e55360b73df2176d672c97edaf.tar.gz
cpython-0b785036ef5482e55360b73df2176d672c97edaf.tar.bz2
Issue #8890: Stop advertising an insecure use of /tmp in docs
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/inputoutput.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index 8da972b..2f08110 100644
--- a/Doc/tutorial/inputoutput.rst
+++ b/Doc/tutorial/inputoutput.rst
@@ -236,9 +236,9 @@ arguments: ``open(filename, mode)``.
::
- >>> f = open('/tmp/workfile', 'w')
+ >>> f = open('workfile', 'w')
>>> print f
- <open file '/tmp/workfile', mode 'w' at 80a0960>
+ <open file 'workfile', mode 'w' at 80a0960>
The first argument is a string containing the filename. The second argument is
another string containing a few characters describing the way in which the file
@@ -339,7 +339,7 @@ of the file, 1 uses the current file position, and 2 uses the end of the file as
the reference point. *from_what* can be omitted and defaults to 0, using the
beginning of the file as the reference point. ::
- >>> f = open('/tmp/workfile', 'r+')
+ >>> f = open('workfile', 'r+')
>>> f.write('0123456789abcdef')
>>> f.seek(5) # Go to the 6th byte in the file
>>> f.read(1)
@@ -363,7 +363,7 @@ objects. This has the advantage that the file is properly closed after its
suite finishes, even if an exception is raised on the way. It is also much
shorter than writing equivalent :keyword:`try`\ -\ :keyword:`finally` blocks::
- >>> with open('/tmp/workfile', 'r') as f:
+ >>> with open('workfile', 'r') as f:
... read_data = f.read()
>>> f.closed
True