pierre cutellic wrote:
> Hi, this is a module i wrote to catch some data from a csv file:
> 
> ##########
> #module csv data reader
> # open a csv file and return its data
> 
> import csv
> import sys
> 
> def __init__(self):
> 

Stop right there. You're confusing modules and
classes. A class has a (meaningful) __init__ method,
which is called when the class is instantiated. You
*can* have an __init__ in a module, but it doesn't
do anything special.

You really just want to rename __init__ to rawdata
and drop the redundant "return rawdata" function.

TJG
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to