Hello,
How do we convert Python object to a C long in Cython? The following
does not work properly as rationals or float gets converted (to their floor)
def f(u):
cdef long u_long = u
the following does
def long f(u):
cdef long u_long = u
if u != u_long:
raise TypeError
but I do not find it very clean.
Thanks,
Vincent
--
You received this message because you are subscribed to the Google Groups
"sage-support" 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-support.
For more options, visit https://groups.google.com/d/optout.