Kaydet (Commit) bbdf6078 authored tarafından Thomas Wouters's avatar Thomas Wouters

Fix broken example of csv.reader use (it returns an iterator, which isn't

indexable) by using the same 'for' construct as all other examples. (Also
emphasizes that reading from a random iterable is no different than reading
from a file.)
üst 41290685
...@@ -421,7 +421,8 @@ easily be done: ...@@ -421,7 +421,8 @@ easily be done:
\begin{verbatim} \begin{verbatim}
import csv import csv
print csv.reader(['one,two,three'])[0] for row in csv.reader(['one,two,three']):
print row
\end{verbatim} \end{verbatim}
The \module{csv} module doesn't directly support reading and writing The \module{csv} module doesn't directly support reading and writing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment