Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(13)

Unified Diff: Modules/_sqlite/row.c

Issue 13583: sqlite3.Row doesn't support slice indexes
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/sqlite3/test/factory.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Modules/_sqlite/row.c Sat Mar 07 09:34:49 2015 -0500
+++ b/Modules/_sqlite/row.c Sat Mar 07 19:32:07 2015 +0200
@@ -142,8 +142,7 @@ PyObject* pysqlite_row_subscript(pysqlit
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");
« no previous file with comments | « Lib/sqlite3/test/factory.py ('k') | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+