Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Is this case common enough for adding special API? The name PyObject_CallMethodArgs looks too similar to the existing name PyObject_CallMethodObjArgs, this will make confusion. If add an API that accepts the method name as C string, you need to add also an API for method name passed as Python string and a private API for method name passed as `struct _Py_Identifier *`. Adding new API has a non-zero cost. It adds maintenance burden for core developers, it increases the number of things that should be learned by users, and can leads to generating less optimal code by the compiler, because it will need to analyze more code in the same file, and it can optimize less common paths and left more common paths unoptimized. Are you aware that you can pass the args tuple unchanged by using PyObject_CallMethod()? PyObject_CallMethod(obj, name, "O", args) ---------- nosy: +serhiy.storchaka, vstinner _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33829> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com