ipython/ipython — Issue #1107: Tab autocompletion can suggest invalid syntax
Author: gpjt
Created: 2011-12-06 11:49:15+00:00
State: open

If you have Django installed, "import dj" gives you this:

In [1]: import dj
django django-admin
In [1]: import django

The "django-admin" option is, of course, invalid syntax. That said, it's hard to know what the correct behaviour would be -- it looks like IPython is (perfectly reasonably) suggesting every module that's on sys.path. Perhaps a filter to make sure that only valid module names were suggested in this case?