Mark Shannon wrote: > The online documentation specifies which API function borrow and/or > steal references (as opposed to the default behaviour). > Yet, I cannot find this information anywhere in the source. There are comments in some places, e.g. in listobject.h: *** WARNING *** PyList_SetItem does not increment the new item's reference count, but does decrement the reference count of the item it replaces, if not nil. It does *decrement* the reference count if it is *not* inserted in the list. Similarly, PyList_GetItem does not increment the returned item's reference count. If you're looking for evidence in the actual code, there's nothing particular to look for -- it's implicit in the way the function works overall. -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4