#11945: Throw exception instead of printing error in c_graph.pyx
-------------------------------------+-------------------------------------
Reporter: kini | Owner: jason, ncohen, rlm
Type: defect | Status: needs_review
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: | adf8d747e145b9374fe9b5bebca4f2379a50fd99
u/jdemeyer/ticket/11945 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by ncohen):
How does "except -1" work when the return type is bint ?
Also, won't this cause that some calls which are currently C calls will
become Python calls ?
{{{
#!diff
cdef class StaticSparseCGraph(CGraph):
cdef short_digraph g
cdef short_digraph g_rev
cdef bint _directed
- cpdef bint has_vertex(self, int n)
- cdef int add_vertex_unsafe(self, int k)
- cdef int del_vertex_unsafe(self, int v)
- cpdef list verts(self)
- cdef int has_arc_unsafe(self, int u, int v)
- cpdef bint has_arc(self, int u, int v)
- cdef int out_neighbors_unsafe(self, int u, int *neighbors, int size)
except? -2
- cpdef list out_neighbors(self, int u)
cpdef int out_degree(self, int u) except -1
- cdef int in_neighbors_unsafe(self, int u, int *neighbors, int size)
except? -2
- cpdef list in_neighbors(self, int u)
cpdef int in_degree(self, int u) except -1
}}}
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/11945#comment:17>
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.