Serhiy Storchaka <[email protected]> added the comment:
I concur with Mark. If you want to work only with non-borrowed references, use PySequence_GetItem() and PySequence_SetItem(). It has a cost: it is slower and needs checking errors. If you need more performant solution and binary compatibility across versions, use PyTuple_GetItem() and PyTuple_SetItem() (borrowed references is the part of optimization). If you don't need binary compatibility, but need speed, use macros. And no need to expand the C API. It is already large enough. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue42294> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
