-
-
Notifications
You must be signed in to change notification settings - Fork 654
Description
Problem Description
Some functions in Sage have two or more names. This is implemented in one of the following two ways:
def foo():
return 0
def foo():
return bar()
or
def foo():
return 0
bar = foo
For the latter, bar
will inherit the same docstring as foo
. This is good for use in an interactive setting, but redundant in the HTML documentation as it duplicates the method description.
For example, IntegerMod
has sqrt and square_root. As you can see in the linked HTML documentation, the entire docstring is repeated for both. This makes the documentation appear more complicated and adds no useful information.
Proposed Solution
For aliased methods/classes/etc, the HTML documentation should only include the full docstring for the original. For the aliases it should instead say something like "Alias for [link to original]". Ideally this does not change behaviour in interactive sessions, only in the HTML documentation (and probably PDF documentation, but that doesn't entirely work right now).
Alternatives Considered
None
Additional Information
There is some code present in the docbuild scripts that seems like it is supposed to do this, but it isn't used.
Is there an existing issue for this?
- I have searched the existing issues for a bug report that matches the one I want to file, without success.