Author roysmith
Recipients roysmith
Date 2008-04-27.02:59:49
SpamBayes Score 0.131919
Marked as misclassified No
Message-id <1209265191.29.0.100156108517.issue2701@psf.upfronthosting.co.za>
In-reply-to
Content
If you pass csv.reader() a filename as its first argument:

  csv.reader('filename')

instead of a file object like you're supposed to, you don't get an error.  
You instead get a reader object which returns the characters which make up 
the filename.

Technically, this is not a bug, since the documentation says, "csvfile can 
be any object which supports the iterator protocol and returns a string 
each time its next method is called", and a string meets that definition.  
Still, this is unexpected behavior, and is almost certainly not what the 
user intended.  It would be useful if a way could be devised to catch this 
kind of mistake.
History
Date User Action Args
2008-04-27 02:59:51roysmithsetspambayes_score: 0.131919 -> 0.131919
recipients: + roysmith
2008-04-27 02:59:51roysmithsetspambayes_score: 0.131919 -> 0.131919
messageid: <1209265191.29.0.100156108517.issue2701@psf.upfronthosting.co.za>
2008-04-27 02:59:50roysmithlinkissue2701 messages
2008-04-27 02:59:49roysmithcreate