[CSV] Re: First Cut at CSV PEP

Andrew McNamara andrewm at object-craft.com.au
Wed Jan 29 01:38:07 CET 2003


>So are we leaning towards dialects being done as simple classes?  Will
>'excel-tsv' simply be defined as 
>
>class excel_tsv(excel_2000):
>    delimiter = '\t'
>
>with a dictionary for lookup:
>
>settings = { 'excel-tsv': excel_tsv,
>             'excel-2000': excel_2000, }

That seems reasonable. +1

The classes should be exposed by the module, however, so the application
can subclass if need be (or just refer to the classes directly, rather
than going via the str->class mapping).

>This hasn't been brought up, but of course one of the major selling
>points of DSV is the "sniffing" code.  However, I think I'm with Dave on
>having another layer (CSVutils) that would contain this sort of thing.

Yep, +1 from me.

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



More information about the Csv mailing list