[ python-Bugs-1157169 ] csv Sniffer returns bad dialect?

SourceForge.net noreply at sourceforge.net
Sat Mar 5 09:14:28 CET 2005


Bugs item #1157169, was opened at 2005-03-05 08:14
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1157169&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Neil Schemenauer (nascheme)
Assigned to: Nobody/Anonymous (nobody)
Summary: csv Sniffer returns bad dialect?

Initial Comment:

>>> d = csv.Sniffer().sniff('abc', ['\t', ','])
>>> csv.reader(['abc'], d)       
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: bad argument type for built-in operation

If the 'delimiters' argument to sniff() is left out
then the TypeError is not raised.  Not sure what's
going on here.

A few other nits:

sniff() seems to be misdocumented.  It cannot return None.

What's the point of the Sniff class?  Why isn't sniff()
a module level function?

The library manual does not state what the iterator
returned by reader() returns.  It should state that
generates lists of strings.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1157169&group_id=5470


More information about the Python-bugs-list mailing list