[Tutor] how to read from a csv file?

Eric Walstad eric at ericwalstad.com
Mon Oct 22 19:07:15 CEST 2007


Tim Golden wrote:
> You really just want to rename __init__ to rawdata
> and drop the redundant "return rawdata" function.

But remember to include the line:
    return rawdata

at the end of your function or else nothing will be printed when
print csvdatareader.rawdata()
is called.

Also, I'd consider using different names for the function and list variable.


More information about the Tutor mailing list