#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):

 Replying to [comment:11 jsrn]:
 > I guess that your sage_autodoc patch is not about the cache
 functionality of your @cached_method decorator -- that is obviously not
 related to this ticket ;-)

 Of course! This ticket will eventually become a dependency for #11115.

 What I intend to do: Modify the `sage_get...` functions from
 `sage.misc.sageinspect` such that they also work on classes: If you have a
 class with an attribute `_sage_doc_` then this attribute would be called -
 resulting in a type error that is not caught:
 {{{
 sage: class MyClass:
 ....:     def _sage_doc_(self):
 ....:         return "my doc"
 ....:
 sage: O = MyClass()
 sage: sage.misc.sageinspect.sage_getdoc(O)
 'my doc\n'
 sage: sage.misc.sageinspect.sage_getdoc(MyClass)
 Traceback (most recent call last):
 ...
 TypeError: unbound method _sage_doc_() must be called with MyClass
 instance as first argument (got nothing instead)
 }}}

 If that is fixed (similarly in the other `sage_get...`) then I suggest to
 replace all calls to `inspect.get...` and to `...__doc__` by the
 corresponding function from `sage.misc.sageinspect`.

 Best regards,

 Simon

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