h3-py icon indicating copy to clipboard operation
h3-py copied to clipboard

Remove Python exceptions from Cython code?

Open ajfriend opened this issue 3 years ago • 0 comments

In #260, we raise Python exceptions. I wonder if we could rework the interface to avoid the Python exceptions (which are Python objects that could potentially slow down the Cython code).

Perhaps we could modify the Cython functions to return (actual_return_value, integer_error_code) tuples? (Tuples can be fully converted to C by Cython.)

This overlaps with https://github.com/uber/h3-py/issues/236 and https://github.com/uber/h3-py/issues/265.

ajfriend avatar Jul 24 '22 03:07 ajfriend