PyF icon indicating copy to clipboard operation
PyF copied to clipboard

Pretty-print anything

Open guibou opened this issue 3 years ago • 2 comments

In PyF we have the {expr:s} or {expr} which converts to string. But it would be nice to have something like python !r to force the conversion to a "repr" format, which should work for any type.

What could be a "repr" format? Well, we could use Generic or Data to derive a generic view of the internal of the structure.

guibou avatar Aug 20 '22 11:08 guibou

Rust does pretty printing / debug with #?.

guibou avatar Aug 20 '22 11:08 guibou

Could try https://hackage.haskell.org/package/recover-rtti ?

michaelpj avatar Aug 31 '22 14:08 michaelpj