#17009: Unbound local in sageinspect
------------------------------+----------------------------
       Reporter:  SimonKing   |        Owner:
           Type:  defect      |       Status:  needs_review
       Priority:  critical    |    Milestone:  sage-6.4
      Component:  misc        |   Resolution:
       Keywords:              |    Merged in:
        Authors:  Simon King  |    Reviewers:
Report Upstream:  N/A         |  Work issues:
         Branch:              |       Commit:
   Dependencies:              |     Stopgaps:
------------------------------+----------------------------
Changes (by {'newvalue': u'Simon King', 'oldvalue': ''}):

 * status:  new => needs_review
 * author:   => Simon King


Comment:

 Fixed! There is some `if ... else` clause in `sage_getargspec`, simplified
 as follows:
 {{{
 #!python
 if cond1:
     try:
         return answer1
     except AttributeError:
         pass
 elif cond2:
     return answer2 or define func_obj
 else:
     return answer3 or define func_obj
 do something with func_obj
 }}}
 So, the obvious problem is that upon catching the error, we want to do
 something with `func_obj` but haven't defined it. Solution: Replace `elif`
 by `if`. Test is added, needs review...

--
Ticket URL: <http://trac.sagemath.org/ticket/17009#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 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