[issue1227] csv docs say 'excel_tab'; code says 'excel-tab'

Dean Elzinga report at bugs.python.org
Tue Oct 2 18:09:56 CEST 2007


Dean Elzinga added the comment:

Ohh! Thanks for the clarification. Sorry for the misunderstanding.

> -----Original Message-----
> From: Skip Montanaro [mailto:report at bugs.python.org]
> Sent: Tuesday, October 02, 2007 8:14 AM
> To: dcelzinga at gmail.com
> Subject: [issue1227] csv docs say 'excel_tab'; code says
> 'excel-tab'
> 
> 
> Skip Montanaro added the comment:
> 
> The string name of the dialect is "excel-tab".  Hyphens
> are not
> valid characters in identifiers though, so the actual
> object
> is named "excel_tab".  When you call
> csv.get_dialect("excel-tab")
> it instantiates the csv.excel_tab class and returns that:
> 
> >>> csv.list_dialects()
> ['excel-tab', 'excel']
> >>> csv.get_dialect("excel-tab")
> <csv.excel_tab instance at 0x820b50c>
> >>> csv.excel_tab
> <class csv.excel_tab at 0x81f9f5c>
> >>> csv.get_dialect("excel-tab").__class__ ==
> csv.excel_tab
> True
> 
> ----------
> assignee:  -> skip.montanaro
> nosy: +skip.montanaro
> resolution:  -> works for me
> status: open -> closed
> 
> __________________________________
> Tracker <report at bugs.python.org>
> <http://bugs.python.org/issue1227>
> __________________________________

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1227>
__________________________________


More information about the Python-bugs-list mailing list