3 ms·
> Isn't the C API CPython specific? It is not a Python-language feature. But the Python ecosystem depends on extensions written using the C API. If you are try
by chrisseaton 9y ago
> Isn't the C API CPython specific? It is not a Python-language feature.
But the Python ecosystem depends on extensions written using the C API. If you are trying to write a new Python implementation and they tell you they need to be able to run some C extension you can tell them 'actually that's a CPython feature' all you want, but they'll go away and not use your implementation.
> How would the C API be expected to work with Jython, or IronPython, or a JS implementation?
Well you'd implement the same API using JNI, PlatformInvoke, or the V8 C extension API, or whatever else the platform you are building on has, respectively. But it's hard!