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

Kenneth Arnold kenneth.arnold@gmail....
Mon Aug 3 17:07:55 CDT 2009

On Mon, Aug 3, 2009 at 5:57 PM, Fernando Perez<fperez.net@gmail.com> wrote:
> we look for 'foo.bar' in your namespace, but we don't do
> eval('foo.bar') at all.  Since '{}' is not in your namespace, it isn't
> found, and the next available completer (for files) tries to fill in.

I occasionally forget something about a built-in type, so I too wish I
could do [].<TAB>. But it's no big deal; I just type []<ENTER>, then

Modules are also dynamically loaded if you do 'from module import
<TAB>', which is helpful but can itself run into problems if you're
not careful. I think there are optional completers for particular
things that require evaluation, like dict keys, but I never got around
to looking that up. You really need to be careful about introspection
in dynamic environments; there are lots of possible hidden side
effects. There's a subtle art between introspecting too much and too
little, and I think the devs have done an overall good job at finding
that balance.

> Early in its life ipython used to eval() user input before completion,
> and that was the source of many problems, so it has been removed.

Another source of random problems in my experience is autocall. If you
don't use it, turn it off (or learn how to use it <grin>).


More information about the IPython-user mailing list