[issue10203] sqlite3.Row doesn't support sequence protocol

Serhiy Storchaka report at bugs.python.org
Mon May 26 22:23:47 CEST 2014


Serhiy Storchaka added the comment:

Looks good, but there is one detail. Whith issue10203.patch when integer index overflows C long, sqlite3.Row.__getitem__() doesn't raise an exception. Instead overflow exception is raised later.

>>> import sqlite3
>>> con = sqlite3.connect(":memory:")
>>> con.row_factory = sqlite3.Row
>>> row = con.execute("select 1 as a, 2 as b").fetchone()
>>> row[2**1000]
2
>>> 
OverflowError: Python int too large to convert to C long

----------
assignee:  -> serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10203>
_______________________________________


More information about the Python-bugs-list mailing list