add a couple missing docstrings

This commit is contained in:
Skip Montanaro 2005-01-05 06:54:58 +00:00
parent 31043cd6d8
commit f26285ce0b
1 changed files with 9 additions and 0 deletions

View File

@ -20,6 +20,13 @@ __all__ = [ "QUOTE_MINIMAL", "QUOTE_ALL", "QUOTE_NONNUMERIC", "QUOTE_NONE",
"unregister_dialect", "__version__", "DictReader", "DictWriter" ] "unregister_dialect", "__version__", "DictReader", "DictWriter" ]
class Dialect: class Dialect:
"""Describe an Excel dialect.
This must be subclassed (see csv.excel). Valid attributes are:
delimiter, quotechar, escapechar, doublequote, skipinitialspace,
lineterminator, quoting.
"""
_name = "" _name = ""
_valid = False _valid = False
# placeholders # placeholders
@ -78,6 +85,7 @@ class Dialect:
return errors return errors
class excel(Dialect): class excel(Dialect):
"""Describe the usual properties of Excel-generated CSV files."""
delimiter = ',' delimiter = ','
quotechar = '"' quotechar = '"'
doublequote = True doublequote = True
@ -87,6 +95,7 @@ class excel(Dialect):
register_dialect("excel", excel) register_dialect("excel", excel)
class excel_tab(excel): class excel_tab(excel):
"""Describe the usual properties of Excel-generated TAB-delimited files."""
delimiter = '\t' delimiter = '\t'
register_dialect("excel-tab", excel_tab) register_dialect("excel-tab", excel_tab)