#9976: Decorated functions/methods have generic signature in documentation
--------------------------------+-------------------------------------------
Reporter: jsrn | Owner: mvngu
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: documentation | Keywords: sphinx, documentation, cython
inspection
Author: jsrn, Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Comment(by jsrn):
I already hit the first snag as I misremembered my patch (because I
originally had two possible solutions): the _sage_getargspec I defined is
a function taking a "getter" function, which is a function able to
construct the argspec of an object. When called by
sage_autodoc.format_args, the getter will be a local function in there,
resulting in a recursive interplay between whatever is in _sage_getargspec
and format_args. This is to avoid copying all the logic in sage_autodoc
for how to produce argspecs for different "basic" objects.
I see two possibilities for how to proceed:
1) Change _sage_getargspec to be like _sage_argspec_: a no-argument
function just returning a tuple. This would entail copying a lot of code
from sage_autodoc to somewhere in the Sage library for easy reuse by
sage_wraps or something.
2) Change _sage_argspec_ to be like _sage_getargspec and take a getter-
function, which is possibly ignored. I'm actually a bit confused about
_sage_argspec_ as it seems to never be used anywhere; it is defined on two
Cython classes (I forget where), but is never called by any code except
your new patch. Therefore, this change would only change these two Cython
classes' _sage_argspec_ functions to accept but ignore a getter argument.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9976#comment:36>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.