This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Mark.Shannon
Recipients Mark.Shannon, vstinner
Date 2020-11-09.14:56:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
I'm not convinced that this is worth the effort.

The old functions aren't going away, so these additional functions provide no real safety.
You can't stop C programmers trading away correctness for some perceived performance benefit :(

If we were designing the API from scratch, then this would be a better set of functions. But because the old functions remain, it just means we are making the API larger.


Please don't add macros, use inline functions.

There seems to be some confusion about borrowed references and stolen references in https://pythoncapi.readthedocs.io/bad_api.html#borrowed-references
"Stealing" a reference is perfectly safe. Returning a "borrowed" reference is not.

So, don't bother with `PyTuple_SetItemRef()`, as `PyTupleSetItem()` is safe.
History
Date User Action Args
2020-11-09 14:56:57Mark.Shannonsetrecipients: + Mark.Shannon, vstinner
2020-11-09 14:56:57Mark.Shannonsetmessageid: <[email protected]>
2020-11-09 14:56:57Mark.Shannonlinkissue42294 messages
2020-11-09 14:56:56Mark.Shannoncreate