~pythonregexp2.7/python/issue2636-20

« back to all changes in this revision

Viewing changes to Doc/library/csv.rst

  • Committer: benjamin.peterson
  • Date: 2008-04-25 01:29:10 UTC
  • Revision ID: svn-v3-trunk1:6015fed2-1504-0410-9fe1-9d1591cc4771:python%2Ftrunk:62490
reformat some documentation of classes so methods and attributes are under the class directive

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
 
219
219
   The :class:`Sniffer` class is used to deduce the format of a CSV file.
220
220
 
221
 
The :class:`Sniffer` class provides two methods:
222
 
 
223
 
.. method:: Sniffer.sniff(sample[, delimiters=None])
224
 
 
225
 
   Analyze the given *sample* and return a :class:`Dialect` subclass reflecting the
226
 
   parameters found.  If the optional *delimiters* parameter is given, it is
227
 
   interpreted as a string containing possible valid delimiter characters.
228
 
 
229
 
 
230
 
.. method:: Sniffer.has_header(sample)
231
 
 
232
 
   Analyze the sample text (presumed to be in CSV format) and return :const:`True`
233
 
   if the first row appears to be a series of column headers.
 
221
   The :class:`Sniffer` class provides two methods:
 
222
 
 
223
   .. method:: sniff(sample[, delimiters=None])
 
224
 
 
225
      Analyze the given *sample* and return a :class:`Dialect` subclass
 
226
      reflecting the parameters found.  If the optional *delimiters* parameter
 
227
      is given, it is interpreted as a string containing possible valid
 
228
      delimiter characters.
 
229
 
 
230
 
 
231
   .. method:: has_header(sample)
 
232
 
 
233
      Analyze the sample text (presumed to be in CSV format) and return
 
234
      :const:`True` if the first row appears to be a series of column headers.
234
235
 
235
236
An example for :class:`Sniffer` use::
236
237