#19850: correct confusing is_constant of symbolic expression
-------------------------------------+-------------------------------------
       Reporter:  dkrenn             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.0
      Component:  symbolics          |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Daniel Krenn       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/dkrenn/is_constant               |  3c349598f4f6f088826db61b5d68869cf9ed154c
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Daniel Krenn', 'oldvalue': ''}):

 * status:  new => needs_review
 * commit:   => 3c349598f4f6f088826db61b5d68869cf9ed154c
 * author:   => Daniel Krenn


Comment:

 I've created a patch. The old `is_constant` was renamed to the private
 `_is_registered_constant_` and a new `is_constant` was created (simply
 chekcing if the symbolic expression contains a variable).

 I also did
 {{{
 sage -grep "is_constant"
 }}}
 and look at the rest of the library; only at one point there the now old
 `is_constant` was used:
 {{{
 sage/interfaces/maxima_lib.py:    elif expr.is_symbol() or
 expr.is_constant():
 }}}
 changed to `_is_registered_as_constant_`
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=7256cf07003890820cb9d632c8a643e9e1e57243
 7256cf0]||{{{rename .is_constant to ._is_registered_constant_}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=6a69fa84d639998801a4dd1e363c0daba5b6cf69
 6a69fa8]||{{{adapt remaining sage library (use _is_registered_constant_
 where necessary)}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=3c349598f4f6f088826db61b5d68869cf9ed154c
 3c34959]||{{{new is_constant}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/19850#comment:2>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to