This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author roysmith
Recipients roysmith
Date 2008-04-27.02:59:49
SpamBayes Score 0.13191918
Marked as misclassified No
Message-id <>
If you pass csv.reader() a filename as its first argument:


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.
Date User Action Args
2008-04-27 02:59:51roysmithsetspambayes_score: 0.131919 -> 0.13191918
recipients: + roysmith
2008-04-27 02:59:51roysmithsetspambayes_score: 0.131919 -> 0.131919
messageid: <>
2008-04-27 02:59:50roysmithlinkissue2701 messages
2008-04-27 02:59:49roysmithcreate