split CSV fields

John Machin sjmachin at lexicon.net
Thu Nov 16 06:26:51 EST 2006


Fredrik Lundh wrote:
> 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.

Hi Fredrik, I read that carefully -- "quoting" appears to have no
effect in this situation.

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

Tomorrow :-)
Cheers,
John




More information about the Python-list mailing list