split CSV fields

Fredrik Lundh fredrik at pythonware.com
Thu Nov 16 12:22:29 CET 2006


John Machin wrote:

> Given Peter Otten's post, looks like
> (1) there's a bug in the "fmtparam" mechanism -- it's ignoring the
> escapechar in my first twiddle, which should give the same result as
> Peter's.
> (2)
> | >>> csv.excel.doublequote
> True
> According to my reading of the docs:
> """
> doublequote
> Controls how instances of quotechar appearing inside a field should be
> themselves be quoted. When True, the character is doubled. When False,
> the escapechar is used as a prefix to the quotechar. It defaults to
> True. 
> """
> Peter's example should not have worked.

the documentation also mentions a "quoting" parameter that "controls 
when quotes should be generated by the writer and recognised by the 
reader.".  not sure how that changes things.

anyway, it's either unclear documentation or a bug in the code.  better 
submit a bug report so someone can fix one of them.

</F>




More information about the Python-list mailing list