From 6f937b1c3038445e59a1bd593c26d6806548b25c Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 7 Aug 2004 15:11:24 +0000 Subject: [Bug #998307] Use open() instead of file() in docs --- Doc/lib/libcsv.tex | 6 +++--- 1 file 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} -- cgit v0.12