[issue35889] sqlite3.Row doesn't have useful repr

Serhiy Storchaka report at bugs.python.org
Sun Mar 3 08:39:02 EST 2019


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I have the same doubts as Berker. sqlite3.Row represents a data from a database. Databases are used in particularly for storing a large amount of data which can not be all loaded in RAM. Therefore sqlite3.Row can contain a data with a very long repr.

If you need to inspect the sqlite3.Row object, it is easy to convert it to a list. If you want to see keys together with values, it is not hard to make a list of key-value pairs or a dict: list(zip(row.keys(), row)) or dict(zip(row.keys(), row)).

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35889>
_______________________________________


More information about the Python-bugs-list mailing list