[Csv] Devil in the details, including the small one between delimiters and quotechars

Andrew McNamara andrewm at object-craft.com.au
Fri Jan 31 00:35:01 CET 2003


>    >>> p.parse('1,"not quoted" ,"quoted"')
>    ['1', 'not quoted ', 'quoted']
>
>Hmmm...  I think this is wrong.  You treated " as the quote character but
>tacked the space onto the field even though it occurred after the " which
>should have terminated the field.  I would have expected:

"Wrong" it might be, but that's what Excel does...

>Damn, yeah.  Maybe we have overspecified the parameter set.  Do we need both
>strict and skipinitialspaces?  I'd say keep strict and dump
>skipinitialspaces, then define fairly precisely what to do when
>strict==False.

I'd go for fine grained in the back end module - remember we have the
"dialects" stuff to hide the complexity from the average user. 

If anything, strict should be broken up so a given flag only enables
one feature.

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


More information about the Csv mailing list