Message65871
| Author | roysmith |
|---|---|
| Recipients | roysmith |
| Date | 2008-04-27.02:59:49 |
| SpamBayes Score | 0.13191918 |
| 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:51 | roysmith | set | spambayes_score: 0.131919 -> 0.13191918 recipients: + roysmith |
| 2008-04-27 02:59:51 | roysmith | set | spambayes_score: 0.131919 -> 0.131919 messageid: <1209265191.29.0.100156108517.issue2701@psf.upfronthosting.co.za> |
| 2008-04-27 02:59:50 | roysmith | link | issue2701 messages |
| 2008-04-27 02:59:49 | roysmith | create | |