You're right -- `_PySys_GetObjectId` calls `_PyDict_GetItemIdWithError`. `PyDict_GetItem` and friends, including `_PyDict_GetItemIdWithError`, return a borrowed reference (i.e., they don't INCREF what they return, and reference still officially belongs to the sys dictionary).