Issue #13583: sqlite3.Row now supports slice indexing.

Tests by Jessica McKellar.
This commit is contained in:
Serhiy Storchaka 2015-03-31 13:33:11 +03:00
parent 80d84c89ee
commit 72e731cc03
4 changed files with 24 additions and 2 deletions

View file

@ -142,8 +142,7 @@ PyObject* pysqlite_row_subscript(pysqlite_Row* self, PyObject* idx)
return NULL;
}
else if (PySlice_Check(idx)) {
PyErr_SetString(PyExc_ValueError, "slices not implemented, yet");
return NULL;
return PyObject_GetItem(self->data, idx);
}
else {
PyErr_SetString(PyExc_IndexError, "Index must be int or string");