Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best way to pprint dotmap dict to a json file ? #55

Open
SvenMeyer opened this issue Oct 20, 2019 · 2 comments
Open

Best way to pprint dotmap dict to a json file ? #55

SvenMeyer opened this issue Oct 20, 2019 · 2 comments

Comments

@SvenMeyer
Copy link

What's the best way to pprint dotmap dict to a json file ?

@SvenMeyer
Copy link
Author

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()) ?

@drgrib
Copy link
Owner

drgrib commented Oct 20, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants