Skip to content

Add option to `pprint` a sub-class of JSONWizard

Open
Overdue by 4 year(s)
Due by January 25, 2022
Last updated Jan 14, 2022
0% complete

I want to add an option on JSONWizard sub-classes to return the prettified representation of the __repr__ method of an instance that the dataclasses module implements - i.e. using the builtin pprint.pformat function - in lieu of our default __str__ implementation, which prints the prettified JSON string representation of the instance.

So essentially, instead of printing a prettified JSON string representation of an instance when print(obj) is invoked, I want it to pretty print the Python object representation of the object. Which would be the same as if the user explicitly called pprint.pprint(obj), but here the benefit is that we can abstract this away from the user, so they only need to call print(obj) to get the desired result in this case.

List view

    There are no open issues in this milestone

    Add issues to milestones to help organize your work for a particular release or project. Find and add issues with no milestones in this repo.