CSV: minimalquoting and skipinitialspace,

Martin Bless m.bless at gmx.de
Wed May 19 06:06:22 EDT 2004


Currently QUOTE_MINIMAL in the standard module CSV only reacts to
"delimiter" and "quotechar". From the documentation:

Currently:
"""
QUOTE_MINIMAL 
Instructs writer objects to only quote those fields which contain the
current delimiter or begin with the current quotechar. 
"""

In my opinion there should be a way to turn on quoting as well for
those fields, that start with white space characters if the dialect
specifies 

dialect.skipinitialspace = False

I wouldn't mind a change leading to this variant:

Proposal:
"""
QUOTE_MINIMAL 
Instructs writer objects to only quote those fields which contain the
current delimiter or begin with the current quotechar or start
with a [blank | white space character] if the dialect specifies
skipinitialspace=False.
"""

What do you think?

MB - Martin Bless



More information about the Python-list mailing list