Mik added the comment:

Hi,

I have just read the documentation once again.

The problem is that it specifies that the default value for Dialect.doublequote 
is True :
<quote>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.</quote>

So it is easy to understand that the class csv.Dialect implements this default 
value. Although the class Dialect default in the csv.reader calling is "Excel" 
and thus, implicitly, it is csv.excel the default class whose attributes are 
described in the above paragraph. 

It would be great in this case to describe the attributes of the base class 
Dialect or specify that all attributes must be settled when we subclass this.

Optionally it would be good that the code of CSV.Dialect be changed for really 
Boolean values. But the clarification of documentation is more important I 
think.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24147>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to