Skip to content Skip to sidebar Skip to footer

Strange Module Auto Complete Behavior In Ipython

See what I mean? At first it showed only RB and absolute_import as choices. STILL I was able to import Gtk. After that it showed a couple of more options. Still isn't a complete l

Solution 1:

Autocompletion try to determine the possible value of what you ask. gi.repository is probably defining stuff at import time so you cannot get everything right before actually importing it.

Like if you overwrote the __getattr__ method of an object, you could make it respond to an arbitrary amount of key without being able to list them.

To know the exact reason you should dive into the code of gi.repository (PyGI itself seem deprecated for 3 Years, replaced by pygobject), which from a quick readthrough is a completly dynamic binding of GObject that really build itself at import time by inspecting Gobject.

So I wouldn't be surprise that such an module have weird behavior at tab-completion.

Post a Comment for "Strange Module Auto Complete Behavior In Ipython"