#9976: Decorated functions/methods have generic signature in documentation
--------------------------------+-------------------------------------------
Reporter: jsrn | Owner: mvngu
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: documentation | Keywords: sphinx, documentation, cython
inspection
Author: jsrn, Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
Changes (by SimonKing):
* status: needs_review => needs_work
Comment:
Replying to [comment:70 SimonKing]:
> The arguments in the documentation of groebner_basis are given by:
> groebner_basis(algorithm, deg_bound, mult_bound='', prot=None,
*args=None, **kwds=False)
NO! That's wrong again. It should be "algorithm='', degbound=None,
mult_bound=None, *args, **kwds"!!
What does that come from?? I see:
{{{
sage: P.<x,y> = QQ[]
sage: I = P*[x,y]
sage: sage.misc.sageinspect.sage_getargspec(I.groebner_basis)
ArgSpec(args=['self', 'algorithm', 'deg_bound', 'mult_bound', 'prot',
'*args', '**kwds'], varargs=None, keywords=None, defaults=('', None, None,
False))
}}}
and that's wrong.
It seems that the problem lies here:
{{{
sage: source = sage.misc.sageinspect.sage_getsource(I.groebner_basis)
sage: sage.misc.sageinspect._sage_getargspec_cython(source)
(['self', 'algorithm', 'deg_bound', 'mult_bound', 'prot', '*args',
'**kwds'], None, None, ('', None, None, False))
}}}
Hence, the bug is in _sage_getargspec_cython.
Too bad.
I guess the problem is that _sage_getargspec_cython does not consider
`*args` and `**kwds`, since it is not supported by Cython. But
`_sage_getargspec_from_ast` can not deal with the problem either.
Potential approach: extend `_sage_getargspec_cython` so that it allows for
`*args` and `**kwds` -- who knows, perhaps Cython will supported such
arguments anyway, in future?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9976#comment:71>
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.