We need to agree on guidelines for when to use and when to not use dynamically typed APIs.
See capi-workgroup/problems#31 (The C API is weakly typed)
In capi-workgroup/problems#31 (comment), @markshannon suggests:
PyObject *obj, PyDictObject *dict;
PyObject_GetItem(obj); // 👍
PyDict_GetItem(dict); // 👍
PyObject_GetItem((PyObject *)dict); // Pointlessly inefficient
PyDict_GetItem((PyDictObject *)obj); // Unsafe
We need to agree on guidelines for when to use and when to not use dynamically typed APIs.
See capi-workgroup/problems#31 (The C API is weakly typed)
In capi-workgroup/problems#31 (comment), @markshannon suggests: