[Csv] This surprised me

Skip Montanaro skip at pobox.com
Sat Feb 8 16:14:55 CET 2003


    >> This code surprised me:
    ...
    Andrew> Surely there's more to your example than you quoted in this
    Andrew> e-mail? The exception you mention came from the python code, not
    Andrew> the C module (specifically the Dialect class), but I can't see
    Andrew> where it referenced in the quoted code?

Nope, nothing more.  I guess the point I was trying to make is that if I
pass a dialect object which is not subclassed from csv.Dialect (as you
suggested I should be able to do), it seems to be silently accepted.

    Andrew> The C code will instanciate (and thus call Dialect's _validate)
    Andrew> when register_dialect is called, or when the class is passed to
    Andrew> reader or writer.

Correct.  But you indicated that was no longer necessary.  I was wondering
where the error checking went to.

Skip



More information about the Csv mailing list