Message268728
This looks fine. But maybe code like this looks more clear:
if (step && _PyLong_Sign(step) == 0) {
PyErr_SetString(PyExc_ValueError,
"range() arg 3 must not be zero");
Py_CLEAR(step);
}
I think assert(PyLong_Check(step)) can be left out since _PyLong_Sign also checks it. |
|
Date |
User |
Action |
Args |
2016-06-17 15:17:51 | xiang.zhang | set | recipients:
+ xiang.zhang, mark.dickinson, serhiy.storchaka |
2016-06-17 15:17:51 | xiang.zhang | set | messageid: <1466176671.25.0.442742166869.issue27333@psf.upfronthosting.co.za> |
2016-06-17 15:17:51 | xiang.zhang | link | issue27333 messages |
2016-06-17 15:17:51 | xiang.zhang | create | |
|