mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #13583: sqlite3.Row now supports slice indexing.
Tests by Jessica McKellar.
This commit is contained in:
parent
80d84c89ee
commit
72e731cc03
4 changed files with 24 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue