dotmap
dotmap copied to clipboard
Best way to pprint dotmap dict to a json file ?
What's the best way to pprint dotmap dict to a json file ?
i ended up just copy-pasting the code from pprint.
Is it possible that within pprint , the else case should read print(self.toDict())
and not pprint(self.toDict())
?
Why do you think that? It's been years since I wrote that code but I wouldn't recommend changing it without having a good reason.
If you would like to modify the pprint
function to have a file
parameter as in Python's print
statement, feel free to fork and create a pull request with the modification. I'd be happy to review.