Message284774
| Author |
serhiy.storchaka |
| Recipients |
belopolsky, methane, ncoghlan, serhiy.storchaka |
| Date |
2017年01月05日.22:04:54 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1483653894.58.0.639450208838.issue29159@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The code restored by 29159-index-fallback.patch is slightly different from the code before issue27704, but the patch LGTM except that arguments of assertEqual are in reversed order.
> Can you explain what your patch does? I don't understand why you single out the OverflowError. When is __index__ expected to raise it?
PyNumber_AsSsize_t(arg, PyExc_OverflowError) raises an OverflowError when the result of __index__ don't fit in Py_ssize_t.
> I wonder if we could check for buffer protocol support before detecting an integer argument?
This would fix an issue with NumPy arrays, but it is much harder to implement. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2017年01月05日 22:04:54 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ncoghlan, belopolsky, methane |
| 2017年01月05日 22:04:54 | serhiy.storchaka | set | messageid: <1483653894.58.0.639450208838.issue29159@psf.upfronthosting.co.za> |
| 2017年01月05日 22:04:54 | serhiy.storchaka | link | issue29159 messages |
| 2017年01月05日 22:04:54 | serhiy.storchaka | create |
|