Sort method auto completion by relevance.

44 views
Skip to first unread message

Simon Brandhorst

unread,
Aug 18, 2017, 8:52:20 AM8/18/17
to sage-devel
What I love about Sage is the following:

I discover an interesting class of objects say a groups. Now I want to play with it, so I create an object foo and type "foo." + Tab and now I can easily explore what I can do with this object.

However many classes have 50 something methods inherited from who know where, some work, some don't and some are even useful.
It would be nice to have the most relevant ones first and not just alphabetical.
Is this possible? At least if I create a new class?


 

Ralf Stephan

unread,
Aug 19, 2017, 3:20:11 AM8/19/17
to sage-devel
As e.g. SymPy has the same problem one might look if it already was addressed in other software using IPython.

Travis Scrimshaw

unread,
Aug 19, 2017, 4:57:10 PM8/19/17
to sage-devel
Define "relevant." Some do not work because of old code that needs to be lifted up to the appropriate category code. However, what might be less useful for you might be useful for someone else. In my mind, alphabetical is the best way to go because it makes it the easiest to find things.

Best,
Travis

Jori Mäntysalo

unread,
Aug 20, 2017, 12:10:39 AM8/20/17
to sage-devel
On Sat, 19 Aug 2017, Travis Scrimshaw wrote:

>> It would be nice to have the most relevant ones first and not just
>> alphabetical.

> Define "relevant."

Well, instead of "relevant" we could define "basic"- or "beginner"-index
for a function, say an integer from 1 to 100. 1-10 would mean something
that is teach before university, 11-30 something that a student learns in
first year at the university, ..., 91-100 something exotic that has been
studied decades ago and not referenced for years.

But I am not really suggesting this. Having a "beginner mode" for a
program is and idea that has been abandoned before. I think we do not have
resources to add another level of metadata.

--
Jori Mäntysalo
Reply all
Reply to author
Forward
0 new messages