File: bitarray/_bitarray.c
Function: bitarray_setitem
Error: returning (PyObject*)NULL without setting an exception
1584 static PyObject *
1585 bitarray_setitem(bitarrayobject *self, PyObject *args)
1586 {
1587     PyObject *a, *v;
1588     idx_t i = 0;
1589 
1590     if (!PyArg_ParseTuple(args, "OO:__setitem__", &a, &v))
when _PyArg_ParseTuple_SizeT() succeeds
taking False path
1591         return NULL;
1592 
1593     if (ISINDEX(a)) {
when considering value == (long unsigned int)0 from bitarray/_bitarray.c:1593
taking False path
when treating unknown struct _typeobject * from bitarray/_bitarray.c:1593 as non-NULL
when treating unknown struct PyNumberMethods * from bitarray/_bitarray.c:1593 as non-NULL
taking True path
when treating unknown struct _typeobject * from bitarray/_bitarray.c:1593 as non-NULL
when considering value == (long int)0 from bitarray/_bitarray.c:1593
taking False path
1594         getIndex(a, &i);
1595 
1596         if (i < 0)
1597             i += self->nbits;
1598 
1599         if (i < 0 || i >= self->nbits) {
1600             PyErr_SetString(PyExc_IndexError, "bitarray index out of range");
1601             return NULL;
1602         }
1603         set_item(self, i, v);
1604     }
1605     else if (PySlice_Check(a)) {
when taking True path
1606         if (setslice(self, (PySliceObject *) a, v) < 0)
when considering range: -0x80000000 <= value <= -1
taking True path
1607             return NULL;
1608     }
1609     else {
1610         PyErr_SetString(PyExc_TypeError, "index or slice expected");
1611         return NULL;
1612     }
1613     Py_RETURN_NONE;
1614 }
returning (PyObject*)NULL without setting an exception
found 2 similar trace(s) to this