#16016: FiniteStateMachine.__and__ calls intersection and
FiniteStateMachine.__or__
calls union.
-------------------------------------+-------------------------------------
Reporter: skropf | Owner:
Type: defect | Status: new
Priority: trivial | Milestone: sage-6.2
Component: combinatorics | Resolution:
Keywords: | Merged in:
finite_state_machine | Reviewers:
Authors: Sara Kropf | Work issues:
Report Upstream: N/A | Commit:
Branch: u/skropf/fsm/and- | ee5c29553460b3dac2db0c092433f9a2297c3cff
intersection-or-union | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by ncohen):
I believe that | and + should be aliases for union. That's how it works
for sets already
{{{
sage: Set([1,2,3])+Set([3,4,6])
{1, 2, 3, 4, 6}
sage: Set([1,2,3])|Set([3,4,6])
{1, 2, 3, 4, 6}
}}}
And for graphs only + is defined
{{{
sage: graphs.PetersenGraph() + graphs.ChvatalGraph()
Petersen graph disjoint_union Chvatal graph: Graph on 22 vertices
sage: graphs.PetersenGraph() | graphs.ChvatalGraph()
...
TypeError: unsupported operand type(s) for |: 'Graph' and 'Graph'
}}}
If you agree with that you can add a `__or__ = __add__` after the
function's definition `:-)`
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/16016#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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.