[IPython-dev] Extensible pretty-printing

Robert Kern robert.kern at gmail.com
Thu Oct 28 17:16:18 EDT 2010


On 10/28/10 3:46 PM, Fernando Perez wrote:
> On Thu, Oct 28, 2010 at 8:07 AM, Robert Kern<robert.kern at gmail.com>  wrote:
>> Well, although I said that before, I do think that pretty's API makes
>> CommandChainDispatcher irrelevant for this use case, and I think we should just
>> use it directly here.
>
> Ah, there was a point of confusion then: your extensions/pretty uses
> CommandChainDispatcher (by raising TryNext), while external/pretty is
> obviously independant.  I had the former in mind, it seems you had the
> latter.  Is that correct?

Yes. The original pull request just tried to restore the status quo 
anterefactor. It happened to use the CommandChainDispatcher because that was the 
extensible API at the time. Since the larger issue of what the extensible API 
*should* be was raised, I am now proposing that we should use pretty.py and 
expose it as the API for people to extend the string representation used in the 
displayhook.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the IPython-dev mailing list