Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6f937b1c
Commit
6f937b1c
authored
Aug 07, 2004
by
Andrew M. Kuchling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bug #998307] Use open() instead of file() in docs
parent
9bae19e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Doc/lib/libcsv.tex
Doc/lib/libcsv.tex
+3
-3
No files found.
Doc/lib/libcsv.tex
View file @
6f937b1c
...
...
@@ -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}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment