summaryrefslogtreecommitdiffstats
path: root/Doc/library/csv.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-09-04 07:15:32 (GMT)
committerGeorg Brandl <georg@python.org>2007-09-04 07:15:32 (GMT)
commit6911e3ce3f72af759908b869b73391ea00d328e2 (patch)
tree5d4ff6070cb3f0f46f0a31ee4805b41053a06b48 /Doc/library/csv.rst
parentc9879246a2dd33a217960496fdf4606cb117c6a6 (diff)
downloadcpython-6911e3ce3f72af759908b869b73391ea00d328e2.zip
cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.gz
cpython-6911e3ce3f72af759908b869b73391ea00d328e2.tar.bz2
Convert all print statements in the docs.
Diffstat (limited to 'Doc/library/csv.rst')
-rw-r--r--Doc/library/csv.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/csv.rst b/Doc/library/csv.rst
index 46302ef..11df7c2 100644
--- a/Doc/library/csv.rst
+++ b/Doc/library/csv.rst
@@ -390,14 +390,14 @@ The simplest example of reading a CSV file::
import csv
reader = csv.reader(open("some.csv", "rb"))
for row in reader:
- print row
+ print(row)
Reading a file with an alternate format::
import csv
reader = csv.reader(open("passwd", "rb"), delimiter=':', quoting=csv.QUOTE_NONE)
for row in reader:
- print row
+ print(row)
The corresponding simplest possible writing example is::
@@ -420,7 +420,7 @@ A slightly more advanced use of the reader --- catching and reporting errors::
reader = csv.reader(open(filename, "rb"))
try:
for row in reader:
- print row
+ print(row)
except csv.Error as e:
sys.exit('file %s, line %d: %s' % (filename, reader.line_num, e))
@@ -429,7 +429,7 @@ done::
import csv
for row in csv.reader(['one,two,three']):
- print row
+ print(row)
The :mod:`csv` module doesn't directly support reading and writing Unicode, but
it is 8-bit-clean save for some problems with ASCII NUL characters. So you can