[IPython-user] IPython tab-completion behaviour in Linux

Robert Kern robert.kern@gmail....
Mon Aug 3 18:35:05 CDT 2009


On 2009-08-03 18:28, Kenneth Arnold wrote:

> Here's a probably bad idea:
>
> object.__getattribute__(obj, '___completable_attributes___')()
> object.__getattribute__(obj, '___completable_items___')()
>
> and a set of hooks to define those methods in the case where you can't
> modify obj.__class__?

A better way is to implement a generic function using the simplegeneric module 
included in IPython. Then you can register or unregister such implementations to 
your heart's content without touching anyone else's types.

-- 
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-user mailing list