#5003: [with patch, needs review] equality testing in graphs should check
"weighted" property
--------------------------+-------------------------------------------------
Reporter: rlm | Owner: rlm
Type: defect | Status: new
Priority: major | Milestone: sage-3.3
Component: graph theory | Resolution:
Keywords: |
--------------------------+-------------------------------------------------
Changes (by rlm):
* summary: [with patch, needs work] equality testing in graphs should
check "weighted" property => [with patch, needs
review] equality testing in graphs should check
"weighted" property
Comment:
Replying to [comment:1 shumow]:
> This fails. Specifically, G.weighted() returns false (which seems like
its own bug.)
Not so much a bug, as a typo in the doctest. If you don't say G is
weighted, then just adding edges with weights shouldn't change that. In
fact, that's the point of the other doctest.
> And Also, the example starting at line 1180 (in the docstring for
weighted(...):
>
...
>
> Fails. Because of the change.
>
> The second issue is more subtle and disturbing. Particularly because it
indicates that a valid example used to work, you will be breaking
compatibility with code that works this way, and you should think about
what the previous assumptions were, and if you can work around them with a
fix.
Well, it's more like we're updating things to actually do it correctly.
Before, weighted wasn't a property of graphs, and that test was kind of a
warning about that. I don't know of any code that would be affected by
this, but I think this is the right way to do things.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5003#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---