New submission from Vlad Shcherbina <vlad.shcherb...@gmail.com>:

To reproduce, run the following program:

import sqlite3
conn = sqlite3.connect(':memory:')
conn.row_factory = sqlite3.Row
print(conn.execute("SELECT 'John' AS name, 42 AS salary").fetchone())

It prints '<sqlite3.Row object at 0xffffffffffffff>'.
It would be nice if it printed something like "sqlite3.Row(name='Smith', 
saraly=42)" instead.
It wouldn't satisfy the 'eval(repr(x)) == x' property, but it's still better 
than nothing.

If the maintainers agree this is useful, I'll implement.

----------
components: Library (Lib)
messages: 334746
nosy: vlad
priority: normal
severity: normal
status: open
title: sqlite3.Row doesn't have useful repr
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35889>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to