Systematically finding bugs in Python C extensions (575+ confirmed so far)

To try to answer what is probably a non-serious question:

Probably some of the reference counting bugs, since you can encode ownership in a wrapper around PyObject*. C++ would also do this nicely though. Ultimately you are wrapping a C interface though so you need to deal with raw pointers eventually.

A good chunk of the issues in Cython were to do with not handling BaseException (e.g. MemoryError, maybe KeyboardInterrupt) but instead clearing them as if they were a regular exception. I don’t believe Rust would have helped with that.