[Csv] _csv bug

Skip Montanaro skip at pobox.com
Wed Feb 5 04:41:59 CET 2003


    >> It's also easier to give more comprehensive feedback in Python.

    Andrew> What sort of comprehensive feedback did you have in mind?

Stuff like:

    class myexcel(csv.excel):
        quotechar = ','
    ...
    quotechar and delimiter must be different

or

    class myexcel(csv.excel):
        lineterminator = '\n'
    ...
    lineterminator and the hard return character should be different

That sort of thing.  (Speaking of which, we should probably all the user to
specify the hard (embedded) return character.)  It's tough enough in C to
generate really good messages (because it often requires pasting strings
together on-the-fly to provide the necessary context) that it frequently
doesn't get done.  For example, if I pass None instead of an int for
parameters with 'i' format characters, all PyArg_PTAK says is "int was
required".  However, there are nine args to the constructor, five of which
are ints.

Skip


More information about the Csv mailing list