On 2025-10-07 11:51 a.m., 'Martin R' via sage-devel wrote:
I don't think we should hide all aliases from tab-completion.
It's just string checks to detect aliases so you could filter to only
remove ones of a specific form such as methods of the form `num_xxx` or
`number_of_xxx` that are aliased to `n_xxx`. Personally I can't think of
a reason not to remove all aliases though (barring some edge cases such
as public methods aliased to a private method, but this can be handled),
but I don't feel too strongly either way so if you only want to apply it
to aliases of a certain form then sure.
Apart from that, what my snippet does is essentially your second
preference, except that removing an alias from `__dir__` is not
sufficient to hide it from tab-completion.
It's not just removing it from `__dir__`? What else is needed?
As long as it's done automatically without programmer intervention, I
don't feel too strongly about the implementation details. I just don't
want something like adding @remove_alias_from_autocomplete to every
aliased method to become yet another quirk of Sage development that we
need to teach to every new contributor (and retroactively apply to the
codebase). Some amount of that is unavoidable in any large software
project, but the less quirks we have the better I think.
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/sage-devel/d76f311f-e73c-4e7e-94e2-1e82f23489a3%40ucalgary.ca.