Conversation
There was a problem hiding this comment.
dictionaries can be large so instead of returning here, I'd set value = pp.pformat(value)
Then value will be shortened if necessary by self.TEXT_REPR.repr() for inclusion in /tmp/q and the full value of value will be placed in a file.
There was a problem hiding this comment.
And if we send to an external file, probably okay to leave an indent of 1 or 2 :-)
There was a problem hiding this comment.
Hmm.. but TextRepr.repr ends up escaping the pprint formatting which is not desirable. So it's not quite that simple :-(
|
Okay, here's a different take on pretty printing: https://gist.github.com/abadger/1db069b6127cc65e914d What do you think? I can turn it into a pull request if you like it better than yours or you can just cherrypick the ideas that you like :-) I wasn't sure if going forward we're going to be pushing to this repo or the mithro repo (I noticed that the 2.5 release was created off of the mithro repo, thus my confusion). |
As discussed in zestyping#21 I've made some changes to the pprint change proposed there. * This will save long values into a separate file. * This makes pprint of the variable the default. I think this is a good idea because it will handle things like dicts nested within lists and other builtin types.
|
The pretty printing changes have ended up in #28 now. Closing this pull request. |
Another random addition which might be worth merging.