#9976: Decorated functions/methods have generic signature in documentation
-----------------------------+----------------------------------------------
   Reporter:  jsrn           |       Owner:  mvngu                
       Type:  enhancement    |      Status:  needs_review         
   Priority:  major          |   Milestone:  sage-4.7             
  Component:  documentation  |    Keywords:  sphinx, documentation
     Author:  jsrn           |    Upstream:  N/A                  
   Reviewer:                 |      Merged:                       
Work_issues:                 |  
-----------------------------+----------------------------------------------

Comment(by SimonKing):

 I am currently working on a related problem, namely a Cython version of
 the cached_method decorators - see #11115.

 Why is that related?

 What one would like to do in this case is to preserve the documentation
 (and also the source code, file and argspec) of the wrapped function. But
 if it is Cython, one can not simply override `__doc__`: Even if `__doc__`
 is defined cdef public, the doc builder would still pick up the the
 documentation of the decorator, not of the wrapped function.

 The obvious solution is to consequently use
 `sage.misc.sageinspect.sage_getdoc` and related methods. Like
 `sage_getargspec`, it allows for more flexibility.

 So, what I would like to do is to edit `doc/common/builder.py` and replace
 the calls to `inspect` by the corresponding calls to `sageinspect`, and
 also replace `__doc__`.

 But shall I post that here, since it is related? Or shall I open a new
 ticket, since, after all, the patch here does not touch `builder.py`?

 Best regards,

 Simon

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9976#comment:9>
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.

Reply via email to