diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-31 10:33:11 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-31 10:33:11 (GMT) |
commit | 72e731cc03f29cdb8bf17bd9ea34c8448954c798 (patch) | |
tree | 02c4ac35bf8bdce758dea1e363912fea0ed3a277 /Modules/_sqlite | |
parent | 80d84c89ee8f10cd3a5d1dfa2ea1cd51f810ec33 (diff) | |
download | cpython-72e731cc03f29cdb8bf17bd9ea34c8448954c798.zip cpython-72e731cc03f29cdb8bf17bd9ea34c8448954c798.tar.gz cpython-72e731cc03f29cdb8bf17bd9ea34c8448954c798.tar.bz2 |
Issue #13583: sqlite3.Row now supports slice indexing.
Tests by Jessica McKellar.
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r-- | Modules/_sqlite/row.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_sqlite/row.c b/Modules/_sqlite/row.c index ed8ad47..d863643 100644 --- a/Modules/_sqlite/row.c +++ b/Modules/_sqlite/row.c @@ -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"); |