Redefinition error when putting functions in a dict #3716
When trying to compile some Python code with Cython, I got the following kind of errors:
I've managed to reduce my code to a reproducible example:
When trying to compile it with
I only get the issue when I the functions have a the same of parameters but different parameters names. If I add type to some parameter of one function, I also don't get an error.
I used the workaround for now, so it's not an urgent issue for me.
The text was updated successfully, but these errors were encountered:
It probably give an error but it seems like a relatively pointless thing to do: you're not putting a bunch of
It doesn't look hugely easy to fix. The utility code is generated
self.to_py_function of the function type, however each
cdef function has its own instance of the type.
An alternative way of fixing it is
DefNodeWrapper tries to get a unique prefix. However, it only gets a prefix from the utility code module, not the overall module.