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

Gökhan Sever gokhansever@gmail....
Mon Aug 3 21:21:01 CDT 2009


On Mon, Aug 3, 2009 at 4:57 PM, Fernando Perez <fperez.net@gmail.com> wrote:

> Hi Gokhan,
>
> On Sun, Jun 28, 2009 at 10:43 PM, Gökhan SEVER<gokhansever@gmail.com>
> wrote:
> > I am wondering whether not getting attributes or models of some empty
> > objects in the right way is a pre-defined behaviour or not? For
> > example when I do "". and hit the tab instead of getting a list that
> > is associated with the string object I get a list of hidden files in
> > the current working directory. However in the []. case if I explicitly
> > write sort I can see that a list object has a sort method.
> >
> > Is this an Ipython bug or could be fixed somehow?
>
> Sorry for not replying earlier... The reason for this is that we avoid
> evaluating the user input before tab completing, because doing so
> would have many potentially problematic side effects.  We query the
> namespace, so if you do
>
> foo.bar.<tab>
>
> 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.
>
> 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.
>
> Is that clear?
>
> Cheers,
>
> f
>

All set Fernando.

I was trying to understand whether this is a deliberately left issue or
because of a better design consideration.

Without asking sometimes it is hard to figure this things out just by
reading.

Thanks again for the clarifications.

-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20090803/dbfc55c1/attachment.html 


More information about the IPython-user mailing list