#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: Simon King | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Comment(by SimonKing):
Replying to [comment:151 jsrn]:
> Good job. Some questions:
>
> 1) When doing my previous example and calling
sageinspect.sage_getdoc(basetwo), I get the doc of functools.partial. Does
this always happen or only in these toy examples?
>
> 2) Why doesn't this work, and should it?
> ...
> What if I put the stuff in a file?
What I did was designed to work on files.
Concerning doc: You did not provide `basetwo` with a custom documentation
- if you modify its `__doc__` then it works:
{{{
sage: deriv.__doc__='blablabla'
sage: si.sage_getdoc(deriv)
'blablabla\n'
}}}
Certainly sage_getsource can not work on your example, since you do not
have a source file.
I believe, however, that sage_getargspec should work on functools.partial,
even if there is no source file.
> 3) Partial functions on partial functions seem to will never work with
your patch; perhaps you should have the check in a while loop or call the
method recursively. This might pertain to other checks in the codes as
well!
When I recursively call sage_getargspec on the `.func` attribute then it
should work fine. That would be better than asking for the source, in the
first place.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9976#comment:152>
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.