[Cython] [cython-users] Problems with "private" functions/methods in Cython 3.0a2

Stefan Behnel stefan_ml at behnel.de
Thu Apr 23 17:36:55 EDT 2020


da-woods schrieb am 23.04.20 um 22:54:
> On 23/04/2020 21:32, Stefan Behnel wrote:
>> The question is: how bad is it for existing code, and how can we either
>> keep things working or make it easy for users to adapt? Should we implement
>> some kind of fallback lookup that still finds unmangled global names if
>> they exist?
>>
>> I mean, double-underscore names are not entirely unheard of in C code and C
>> libraries. The Python behaviour redners their usage from within classes
>> more difficult.
>>
> I think this could actually be a real problem for people trying to interact
> with C libraries.  I'd favour a fallback that finds unmangled cdef/c names
> only (and maybe gives a helpful warning but no match if a Python name is
> found). That gives 100% compatibility on the Python side, but a sensible
> fallback on the C side.

Ok, I think this is worth a ticket by now. Let's discuss this over there.

https://github.com/cython/cython/issues/3544

Stefan


More information about the cython-devel mailing list