[Csv] CSV module brain surgery

Andrew McNamara andrewm at object-craft.com.au
Fri Jan 7 04:08:33 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.
>
>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. ;-)

Yes, obviously the published interface should remain the same, although
the validation done by the Dialect base class is no longer needed (the
underlying dialect type does it's own validation).

BTW, I've managed to fix several of the issues raised by:

    http://www.google.com.au/groups?selm=vsb89q1d3n5qb1%40corp.supernews.com

The tricky bit is assuring myself that I haven't introduced any regressions
in the process. 8-)

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/


More information about the Csv mailing list