#13646: Bug in p.add_constraint (when input is True/False)
-----------------------------------------------+----------------------------
       Reporter:  ncohen                       |         Owner:  ncohen      
           Type:  defect                       |        Status:  needs_review
       Priority:  major                        |     Milestone:  sage-5.5    
      Component:  linear programming           |    Resolution:              
       Keywords:                               |   Work issues:              
Report Upstream:  N/A                          |     Reviewers:              
        Authors:  Nathann Cohen, Volker Braun  |     Merged in:              
   Dependencies:                               |      Stopgaps:              
-----------------------------------------------+----------------------------

Comment (by dimpase):

 Replying to [comment:21 ncohen]:
 > > I found a lot of places in the graphs stuff where `Sum(...) +
 Sum(...)` occurs. As soon as one of the sums returns ``None`` this will
 raise a `TypeError`.
 >
 > And if it never did, it may be because there is mathematical reason for
 that, or did you make sure of the opposite ?

 One surely can code in a very dangerous style, but this does not mean that
 it should be forced upon they many Sage users.
 E.g. #12091 (largely a duplicate of the current ticket) is a very good
 example (actually, #12091 seems to be fixed by the Volker's patch---at
 least the 1st example in the ticket description is fixed!) of pitfalls the
 current LP code is creating.

 For one, I would kill for Sum() returning what it should, and not None.

 It's sad it might break some private code, but it's a fact of life. Sage
 cannot always maintain the backward compatibility, after all. E.g. a move
 to Python 3 will break stuff for a lot of people. Please show us a typical
 fragment broken by Volker's patch, and we will see the best workaround.
 (Well, it could be that all it needs is a private definition of Sum(),
 can't tell without looking.)

 > > We will remove the hardcoded RDF in #13650, so its just a matter of
 time until its gone. Its not an option to hardcode RDF in Sum in the long
 run.
 >
 > It has been an option to not have a base ring at all for a very long
 while now.

 Sure, but it was a bad design decision not to have one.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13646#comment:23>
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.

Reply via email to