#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 vbraun):
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 the problem is precisely that it can't return
`MixedIntegerLinearProgram.base_ring()` because that requires an instance
of `MixedIntegerLinearProgram`. Right now the Sum is just deprecated, so
you have at least a year to replace `Sum()` -> `p.sum()`. Which is a
pretty simple search&replace. No code will break with this patch, you only
get a deprecation warning the first time that you use `Sum`.
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.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13646#comment:20>
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.