summaryrefslogtreecommitdiffstats
path: root/Lib/sqlite3/dbapi2.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-05-28 09:57:38 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-05-28 09:57:38 (GMT)
commit30080fd63d29e736e64d4d7b790f36485e0099b1 (patch)
tree51b4e123be232678b5fbbf71bd5d63a818a62da8 /Lib/sqlite3/dbapi2.py
parentd0d4f2d0c653c94396ee1e7dc2b80d7debc80e9e (diff)
downloadcpython-30080fd63d29e736e64d4d7b790f36485e0099b1.zip
cpython-30080fd63d29e736e64d4d7b790f36485e0099b1.tar.gz
cpython-30080fd63d29e736e64d4d7b790f36485e0099b1.tar.bz2
Issue #10203: sqlite3.Row now truly supports sequence protocol. In particular
it supports reverse() and negative indices. Original patch by Claudiu Popa.
Diffstat (limited to 'Lib/sqlite3/dbapi2.py')
-rw-r--r--Lib/sqlite3/dbapi2.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/sqlite3/dbapi2.py b/Lib/sqlite3/dbapi2.py
index 00a798b..0d4dcaf 100644
--- a/Lib/sqlite3/dbapi2.py
+++ b/Lib/sqlite3/dbapi2.py
@@ -21,6 +21,7 @@
# misrepresented as being the original software.
# 3. This notice may not be removed or altered from any source distribution.
+import collections
import datetime
import time
@@ -51,6 +52,7 @@ version_info = tuple([int(x) for x in version.split(".")])
sqlite_version_info = tuple([int(x) for x in sqlite_version.split(".")])
Binary = buffer
+collections.Sequence.register(Row)
def register_adapters_and_converters():
def adapt_date(val):