#13174: Wrong documentation for methods @cached_method
-------------------------------------+-------------------------------------
       Reporter:  Snark              |        Owner:  mvngu
           Type:  defect             |       Status:  needs_review
       Priority:  critical           |    Milestone:  sage-6.2
      Component:  documentation      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Ralf Stephan       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/rws/ticket/13174                 |  51a3f955558ebebee570c4f4baab43e48a892b40
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by rws):

 Replying to [comment:5 mmezzarobba]:
 > I suspect you should call `sage.misc.sageinspect.sage_getdoc` or
 something (which would use the implementation of `_sage_doc` provided by
 cached methods, and work for other kinds of magic objects) instead of
 special-casing cached methods in `sagedoc.py`.

 All Sage functions may have a `sage_getdoc` method, but not all magic
 objects can be recognized in one comparison (no superclass of magic
 objects: `CachedFunction` directly inherits from object). You could now
 either copy the `pydoc.Helper` functionality into Sage, or create a magic
 function superclass that provides the function to give to `python_help()`.
 Shying back from the latter, the call to `python_help()` would be replaced
 by
 {{{
     import pydoc
     pydoc.pager(sage_getdoc(func))
 }}}

 This indeed gives you the help for ''all'' functions, regardless if magic
 or not, and even python builtins. However, text formatting is lost
 somewhere, so there is a bit more to it. What do you think, magic
 superclass or rewrite of `sagedoc.py:help()`?

--
Ticket URL: <http://trac.sagemath.org/ticket/13174#comment:6>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to