#14017: Determine the correct argspec for python functions defined in cython 
files
------------------------------------------------+---------------------------
       Reporter:  SimonKing                     |         Owner:  jason   
           Type:  defect                        |        Status:  new     
       Priority:  major                         |     Milestone:  sage-5.7
      Component:  misc                          |    Resolution:          
       Keywords:  introspection cython argspec  |   Work issues:          
Report Upstream:  N/A                           |     Reviewers:          
        Authors:                                |     Merged in:          
   Dependencies:                                |      Stopgaps:          
------------------------------------------------+---------------------------

Comment (by SimonKing):

 Here is our problem:
 {{{
 sage: obj = UniqueRepresentation.__classcall__.f
 sage: from sage.misc.sageinspect import sage_getsource,
 _sage_getargspec_from_ast, _sage_getargspec_cython
 sage: source = sage_getsource(obj, is_binary=True)
 sage: _sage_getargspec_cython(source)   # wrong
 (['cls', '*args', '**options'], None, None, None)
 sage: _sage_getargspec_from_ast(source) # correct
 ArgSpec(args=['cls'], varargs='args', keywords='options', defaults=None)
 }}}

 Perhaps `_sage_getargspec_cython` (which is called if it is suspected that
 the function is defined in Cython) should first check whether
 `_sage_getargspec_from_ast` works.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14017#comment:1>
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].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to