[Csv] another _csv question

Andrew McNamara andrewm at object-craft.com.au
Wed Feb 5 04:26:17 CET 2003


>    Andrew> I think this is an unnecessary restriction. You might want to do
>    Andrew> something like:
>
>    Andrew>     class SnifferDialect(csv.Dialect):
>    Andrew>         pass
>
>    Andrew>     def sniff(...):
>    Andrew>         dialect = SnifferDialect()
>    Andrew>         ... try stuff ...
>    Andrew>         dialect.delimiter = '\t'
>    Andrew>         ... try more stuff ...
>
>I can buy that.  Maybe what we need then is some way to force validation
>after changes are made, but before the dialect info is tossed over the wall
>to the low-level module.

I think we're trying too hard - it's acceptable for the validation to only
occur when the reader or writer factories are called, I think.

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


More information about the Csv mailing list