#11945: Throw exception instead of printing error in c_graph.pyx
-------------------------------------+-------------------------------------
Reporter: kini | Owner: jason, ncohen, rlm
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: graph theory | Resolution:
Keywords: cython exception | Merged in:
cpdef print c_graph | Reviewers:
Authors: Jeroen Demeyer | Work issues:
Report Upstream: N/A | Commit:
Branch: | 2de64d45efaa70525932f6d086aef3afbef31cbe
u/jdemeyer/ticket/11945 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by jdemeyer):
Replying to [comment:10 ncohen]:
> Why would you do that ? `O_o`
>
> {{{
> #!diff
> - raise ValueError("Thou shalt not add a vertex to an immutable
graph")
> + self.add_vertex_unsafe(k)
> }}}
Throwing the same exception in 2 different places seemed a bit stupid. And
it allows to actually test the `add_vertex_unsafe` method.
--
Ticket URL: <http://trac.sagemath.org/ticket/11945#comment:11>
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.