bpo-28197: Add start and stop keywords to range.index() method by nitishch · Pull Request #4378 · python/cpython (original) (raw)

if(start){
if(!PyLong_CheckExact(start)){
PyErr_Format(PyExc_TypeError,
"start value must be integer, not %.200s",
start->ob_type->tp_name);
return NULL;
}
}
if(stop){
if(!PyLong_CheckExact(stop)){
PyErr_Format(PyExc_TypeError,
"stop value must be integer, not %.200s",
stop->ob_type->tp_name);
return NULL;
}
}
if(start && (!PyLong_CheckExact(start))){
PyErr_Format(PyExc_TypeError,
"start value must be integer, not %.200s",
start->ob_type->tp_name);
return NULL;
}
if(stop && (!PyLong_CheckExact(stop))){
PyErr_Format(PyExc_TypeError,
"stop value must be integer, not %.200s",
stop->ob_type->tp_name);
return NULL;
}