[Csv] CSV module brain surgery

Skip Montanaro skip at pobox.com
Fri Jan 7 03:22:22 CET 2005


    Andrew> The "dialect" type in the CSV module had been bugging me for a
    Andrew> while - it's used to hold the C-type representation of the
    Andrew> parser config, and barely exposed to the user (except as an
    Andrew> attribute on the reader and writer objects).

    Andrew> There were several problems with this internal dialect type -
    Andrew> the primary one was that you could write to it's attributes,
    Andrew> which meant that cross-attribute validation was doomed. It also
    Andrew> reported errors terribly, typically raising something like
    Andrew> "invalid type for builtin" and no more information.

    Andrew> So, I rewrote it.

    ....

    Andrew> I'm about ready to commit this (and some minor changes to the
    Andrew> tests).  Comments, please?

As long as I can still pass a dialect class into the constructor and have it
interpreted properly, I don't really what else happens. ;-)

Skip



More information about the Csv mailing list