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

Vlad Shcherbina report at bugs.python.org
Fri Feb 22 05:21:37 EST 2019


Vlad Shcherbina <vlad.shcherbina at gmail.com> added the comment:

There is no need to add explicit knowledge of reprlib to the Row object or vice versa.

Those who use reprlib to limit output size will have no problem. Reprlib already truncates arbitrary reprs at the string level: https://github.com/python/cpython/blob/22bfe637ca7728e9f74d4dc8bb7a15ee2a913815/Lib/reprlib.py#L144

Those who use builtin repr() have to be prepared for the possibility of unbounded repr anyway, because all collection-like objects in Python have unbounded __repr__.

It would be annoying if some collection-like objects decided to be clever and omit parts of their regular __repr__ because they feel it's too much for the user to handle.

----------

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


More information about the Python-bugs-list mailing list