> I would call the code in the Sage notebook that is used to *implement*
> tab completion.
If I see correctly, the notebook tab completion is different from the
tab completion on the command line, which can be seen in the following
example:
sage: class FOO:
....: def __init__(self,x):
....: self.x = x
....: def __getattr__(self,s):
....: print s
....: return getattr(self.x,s)
....:
sage: foo = FOO(x)
sage: import sagenb.misc.support as s
sage: s.completions('foo.c',globals(),system='python')
__members__
__methods__
trait_names
[]
sage: foo.c<hit tab key>__members__
__methods__
trait_names
_getAttributeNames
}}}
So, the methods of foo called by command line tab completion and
notebook tab completion are different.
In ticket #6854 I provide an attribute __methods__, which makes
introspection work. If I understand correctly, it also makes tab
completion in the notebook work. But for tab completion on the command
line, I implemented _getAttributeNames.
Please comment on the ticket if that approach was stupid.
Cheers,
Simon