#9976: Decorated functions/methods have generic signature in documentation
--------------------------------+-------------------------------------------
Reporter: jsrn | Owner: jsrn
Type: enhancement | Status: needs_review
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):
Ok, this might be nitpicking, but I'm not completely happy with your hack
in lines 731-740: first off, the following function definition, I think,
would cause the code to fail:
{{{
def monkey2(a={(1+2) : 'wee'}):
return a[3]
}}}
and in general, there's no way to avoid that with your approach, as you
can't match nested parentheses with regular expressions.
Ok, moving back to realism, is this then really what we want? I mean, if a
decorator is so insightful so as to save the wrapped function's src in its
own _sage_src_, but does not save its argspec in _sage_argspec_, aren't we
asking for errors? (I'm talking in the future and not right now where of
course _sage_argspec_ has just been introduced.) And wouldn't it be nice
that this "error" is quite visible in the documentation so authors and
reviewers can find the error? I would be perfectly happy and glad with
groebner_basis and similar functions having documentation slightly off
until cached_method is changed to write to _sage_argspec_ (which I guess
will probably end up being in the same release as this ticket).
Of course, we could also retain this fix until such time as the
cached_method is fixed, and ticket #11115 could have the removal of this
code in its ticket. Was this what you had in mind all along?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9976#comment:85>
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.