Show More
@@ -687,7 +687,11 b' def _repr_pprint(obj, p, cycle):' | |||||
687 | """A pprint that just redirects to the normal repr function.""" |
|
687 | """A pprint that just redirects to the normal repr function.""" | |
688 | # Find newlines and replace them with p.break_() |
|
688 | # Find newlines and replace them with p.break_() | |
689 | output = repr(obj) |
|
689 | output = repr(obj) | |
690 |
|
|
690 | lines = output.splitlines() | |
|
691 | # insert a leading newline for multi-line objects that are indented | |||
|
692 | if len(lines) > 1 and p.indentation != p.output_width: | |||
|
693 | p.break_() | |||
|
694 | for idx, output_line in enumerate(lines): | |||
691 | if idx: |
|
695 | if idx: | |
692 | p.break_() |
|
696 | p.break_() | |
693 | p.text(output_line) |
|
697 | p.text(output_line) |
General Comments 0
You need to be logged in to leave comments.
Login now