[Csv] CSV interface question

Cliff Wells LogiplexSoftware at earthlink.net
Thu Jan 30 21:23:27 CET 2003


On Wed, 2003-01-29 at 17:57, Skip Montanaro wrote:
>     Cliff> Consider now the programmer actually defining a new dialect:
>     Cliff> Passing a class or other structure (a dict is fine), they can
>     Cliff> create this on the fly with minimal work.  Using a *string*, they
>     Cliff> must first "register" that string somewhere (probably in the
>     Cliff> mapping we agree upon) before they can actually make the function
>     Cliff> call.  Granted, it's only a an extra step, but it requires a bit
>     Cliff> more knowledge (of the mapping) and doesn't seem to provide a
>     Cliff> real benefit.  If you prefer a mapping to a class, that is fine,
>     Cliff> but lets pass the mapping rather than a string referring to it:
> 
> Somewhere I think we still need to associate string names with these
> beasts.  Maybe it's just another attribute:
> 
>     class dialect:
>         name = None
> 
>     class excel(dialect):
>         name = "excel"
>         ...
> 
> They should all be collected together for operation as a group.  This could
> be so a GUI knows all the names to present or so a sniffer can return all
> the dialects with which a sample file is compatible.  Both operations
> suggest the need to register dialects somehow.

+1 on this.  Hm.  If I keep trying I might get you to agree with
everything just out of exhaustion <wink>

-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308  (800) 735-0555 x308



More information about the Csv mailing list