[Csv] Moving _csv.c closer to PEP

Dave Cole djc at object-craft.com.au
Fri Jan 31 01:28:08 CET 2003


>>>>> "Skip" == Skip Montanaro <skip at pobox.com> writes:

Dave> In the process of fixing _csv.c so it will handle the parameters
Dave> specified in the PEP I came across yet another configurable
Dave> dialect setting.

Dave>  doublequote

Dave>    When True quotechar in a field value is represented by two
Dave>    consecutive quotechar.

Skip> Isn't that implied as long as quoting is not "never" and
Skip> escapechar is None?  If so, and we decide to have a separate
Skip> doublequote parameter anyway, checking that relationship should
Skip> be part of validating the parameter set.

Checking against a dialect, or just as a collection of parameters?

I think we are fast reaching the point where the only meaningful way
forward is to start collecting dialects.

Skip> Speaking of doubling things, can the low-level partser support
Skip> mulit-character quotechar or delimiter strings?  Recall I
Skip> mentioned the previous client who didn't quote anything in their
Skip> private file format and used ::: as the field separator.

Currently the parser only handles single character quotechar,
delimiter, and escapechar.

I suspect that quotechar, delimiter, and escapechar of more than a
single character might be stretching the bounds of what you could
reasonably call a CSV parser.

- Dave

-- 
http://www.object-craft.com.au



More information about the Csv mailing list