Message82936
| Author |
aguiar |
| Recipients |
aguiar |
| Date |
2009年02月28日.18:30:22 |
| SpamBayes Score |
5.9496393e-05 |
| Marked as misclassified |
No |
| Message-id |
<1235845824.28.0.0746931050705.issue5395@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
At arraymodule.c (line 1258):
nread = fread(item + (Py_SIZE(self) - n) * itemsize,
itemsize, n, fp);
if (nread < (size_t)n) {
Py_SIZE(self) -= (n - nread);
PyMem_RESIZE(item, char, Py_SIZE(self)*itemsize);
self->ob_item = item;
self->allocated = Py_SIZE(self);
PyErr_SetString(PyExc_EOFError,
"not enough items in file");
return NULL;
}
When fread returns 0, ferror should be called to check if it was an EOF
or an error condition. It is not handling OSErrors, such as I/O errors,
raising always "not enough items in file". |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年02月28日 18:30:24 | aguiar | set | recipients:
+ aguiar |
| 2009年02月28日 18:30:24 | aguiar | set | messageid: <1235845824.28.0.0746931050705.issue5395@psf.upfronthosting.co.za> |
| 2009年02月28日 18:30:22 | aguiar | link | issue5395 messages |
| 2009年02月28日 18:30:22 | aguiar | create |
|