Reputation: 2656
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 list of modules. If I import some other module (which I know of from the docs), then it appears in the list.
(I posted a similar problem previously but I wasn't able to explain it sufficiently well so I'm posting it again with better details)
Upvotes: 0
Views: 159
Reputation: 27853
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.
Upvotes: 1