Files
2026-07-13 13:17:40 +08:00

20 lines
478 B
Python

from collections.abc import Mapping
def row_str(row: Mapping) -> str:
"""Convert a row to string representation."""
return str(row.as_pydict())
def row_repr(row: Mapping) -> str:
"""Convert a row to repr representation."""
return str(row)
def row_repr_pretty(row: Mapping, p, cycle):
"""Pretty print a row."""
from IPython.lib.pretty import _dict_pprinter_factory
pprinter = _dict_pprinter_factory("{", "}")
return pprinter(row, p, cycle)