You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, then the output is not aligned properly, since Python's pprint doesn't know we are already indented. Here is an example, where Function should be indented more:
Does anyone either have a tip on how to indent this properly or a way to more seamlessly integrate IPython's pprinting with Python's own pprint module?
The text was updated successfully, but these errors were encountered:
I have a custom class and would like IPython to use
pprint
when converting it to pretty text, since I have already defined the pretty print implementation of my class.I am able to do this by overriding
_repr_pretty
to defer to pprint, like this:However, then the output is not aligned properly, since Python's pprint doesn't know we are already indented. Here is an example, where
Function
should be indented more:Does anyone either have a tip on how to indent this properly or a way to more seamlessly integrate IPython's pprinting with Python's own
pprint
module?The text was updated successfully, but these errors were encountered: