#17156: Creating a graph from a immutable digraph raises an error
-------------------------+-------------------------------------------------
Reporter: | Owner: tscrim
tscrim | Status: positive_review
Type: | Milestone: sage-6.4
defect | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers: Travis Scrimshaw
theory | Work issues:
Keywords: | Commit:
immutable graph | 24d81bb6c34166acb6394935ee6d77f093c7674b
Authors: | Stopgaps:
Nathann Cohen |
Report Upstream: N/A |
Branch: |
u/ncohen/17156 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by jdemeyer):
Replying to [ticket:17156 tscrim]:
> I'm also wondering about the error type of (attempted) mutations of
immutable (di)graphs. Some raise a `ValueError`, others raise a
`NotImplementedError`.
`NotImplementedError` is certainly not right, it seems to imply that it
could get implemented someday. I also find `ValueError` dubious, since
there is not really a "value" which is wrong.
I would actually vote for `TypeError`, which is what you get when you an
operation which is not supported on some type, similar to
{{{
>>> "aaa"/3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'str' and 'int'
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/17156#comment:6>
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.