ipython/ipython — pull request #3851 by alexrudy (2013-07-31 01:55:28+00:00)
Title: Adds an explicit newline for pretty-printing.

This is a response to issue #2136 to handle hard newlines in pretty printing.

Included:

- ``p.break_()`` inserts a hard newline in the output, maintaining the correct indentation during pretty printing.
- When the pretty printer falls back to the object's ``__repr__`` method, newlines are converted from ``\n`` to ``p.break_()`` to maintain indentation

Not Included:
- Although discussed, newlines in ``p.text()`` are not converted to calls to ``p.break_``

There are three basic tests that I've added to test this functionality.