Open
Description
Lots of functions return borrowed references, but in many cases it's not clear what's lending the reference, and how to ensure that lender keeps the reference alive as long as necessary.
For example, PyList_GetItem
is very tricky to use 100% correctly -- it's relatively obvious that the list is the lender (so you need to keep it around), but it's not obvious that arbitrary Python code (like a finalizer) could clear the list and drop the reference.