#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, cython
inspection
Author: jsrn, Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Comment(by SimonKing):
Replying to [comment:77 jsrn]:
> Question: On line 1064 of sage_autodoc.py after your patch, you remove
self and cls if they are there. Why do you use that check:
>
> {{{
> if argspec is not None and argspec[0] and argspec[0][0] in ('cls',
'self'):
> }}}
>
> instead of
>
> {{{
> if isclassinstance(obj) or inspect.isclass(obj):
> }}}
>
> which you have included, commented out, on the line above, and which you
used on line 819 for something similar?
Good question. I don't know if there was a concrete reason.
I guess I did this because it is in
`sage_autodoc.MethodDocumenter.format_args`, hence, we already know that
we are dealing with a method. So, I was inclined to simply delete
`argspec[0][0]`, but then I thought "better safe than sorry".
The commented-out line could be removed, if you wish.
> I'll look into some doctests...
Looking forward!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9976#comment:78>
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.