summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2004-08-07 15:11:24 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2004-08-07 15:11:24 (GMT)
commit6f937b1c3038445e59a1bd593c26d6806548b25c (patch)
tree01427db3e3884c5a8299545e70ea7fac94560e1b /Doc
parent9bae19e8b10e8436e1bb3c6dc22ceba9ce55c8ce (diff)
downloadcpython-6f937b1c3038445e59a1bd593c26d6806548b25c.zip
cpython-6f937b1c3038445e59a1bd593c26d6806548b25c.tar.gz
cpython-6f937b1c3038445e59a1bd593c26d6806548b25c.tar.bz2
[Bug #998307] Use open() instead of file() in docs
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libcsv.tex6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/lib/libcsv.tex b/Doc/lib/libcsv.tex
index 5486cf1..cac39bc 100644
--- a/Doc/lib/libcsv.tex
+++ b/Doc/lib/libcsv.tex
@@ -314,7 +314,7 @@ The ``Hello, world'' of csv reading is
\begin{verbatim}
import csv
-reader = csv.reader(file("some.csv", "rb"))
+reader = csv.reader(open("some.csv", "rb"))
for row in reader:
print row
\end{verbatim}
@@ -323,7 +323,7 @@ To print just the first and last columns of each row try
\begin{verbatim}
import csv
-reader = csv.reader(file("some.csv", "rb"))
+reader = csv.reader(open("some.csv", "rb"))
for row in reader:
print row[0], row[-1]
\end{verbatim}
@@ -332,7 +332,7 @@ The corresponding simplest possible writing example is
\begin{verbatim}
import csv
-writer = csv.writer(file("some.csv", "wb"))
+writer = csv.writer(open("some.csv", "wb"))
for row in someiterable:
writer.writerow(row)
\end{verbatim}