namedtupled icon indicating copy to clipboard operation
namedtupled copied to clipboard

Print contents pretty

Open jrwrigh opened this issue 7 years ago • 1 comments

It'd be nice to have __dict__() to be able to list out all the keys and values. That or it print out the contents in a json-like format

jrwrigh avatar May 03 '18 13:05 jrwrigh

There are actually instructions for how to reset the __str__ in the python documentation for namedtuples. Basically you create a class that has the namedtuple as a subclass, then modify that classes __str__ function. As to how to do that recursively, I'm not sure.

jrwrigh avatar May 04 '18 14:05 jrwrigh