summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libcsv.tex
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2003-05-19 15:33:36 (GMT)
committerSkip Montanaro <skip@pobox.com>2003-05-19 15:33:36 (GMT)
commit77892373313b7195e16755abe0604bd734df4736 (patch)
tree71fe6dd39510d42b94b9f6a5831efb5ce9210af7 /Doc/lib/libcsv.tex
parentc626658a2803bb48a25b6c845ab60d72be1ed5d4 (diff)
downloadcpython-77892373313b7195e16755abe0604bd734df4736.zip
cpython-77892373313b7195e16755abe0604bd734df4736.tar.gz
cpython-77892373313b7195e16755abe0604bd734df4736.tar.bz2
* Correct Sniffer doc to correspond to the implementation.
* Add optional delimiters arg to Sniffer.sniff() which restricts the set of candidate field delimiters.
Diffstat (limited to 'Doc/lib/libcsv.tex')
-rw-r--r--Doc/lib/libcsv.tex14
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/lib/libcsv.tex b/Doc/lib/libcsv.tex
index f30aefe..a287ba8 100644
--- a/Doc/lib/libcsv.tex
+++ b/Doc/lib/libcsv.tex
@@ -152,17 +152,17 @@ attributes, which are used to define the parameters for a specific
\class{reader} or \class{writer} instance.
\end{classdesc*}
-\begin{classdesc}{Sniffer}{\optional{sample=16384}}
-The \class{Sniffer} class is used to deduce the format of a CSV file. The
-optional \var{sample} argument to the constructor specifies the number of
-bytes to use when determining Dialect parameters.
+\begin{classdesc}{Sniffer}{}
+The \class{Sniffer} class is used to deduce the format of a CSV file.
\end{classdesc}
The \class{Sniffer} class provides a single method:
-\begin{methoddesc}{sniff}{fileobj}
-Analyze the next chunk of \var{fileobj} and return a \class{Dialect} subclass
-reflecting the parameters found.
+\begin{methoddesc}{sniff}{sample\optional{,delimiters=None}}
+Analyze the given \var{sample} and return a \class{Dialect} subclass
+reflecting the parameters found. If the optional \var{delimiters} parameter
+is given, it is interpreted as a string containing possible valid delimiter
+characters.
\end{methoddesc}
\begin{methoddesc}{has_header}{sample}