Skip to content

Commit 7f69f2d

Browse files
committed
Address code review
1 parent f0b8a8f commit 7f69f2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Include/internal/pycore_list.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ extern "C" {
1010

1111
PyAPI_FUNC(PyObject*) _PyList_Extend(PyListObject *, PyObject *);
1212
extern void _PyList_DebugMallocStats(FILE *out);
13-
// _PyList_GetItemRef should be used only when the object is known to be a list.
13+
// _PyList_GetItemRef should be used only when the object is known as a list
14+
// because it doesn't raise TypeError when the object is not a list, whereas PyList_GetItemRef does.
1415
extern PyObject* _PyList_GetItemRef(PyListObject *, Py_ssize_t i);
1516

1617
#define _PyList_ITEMS(op) _Py_RVALUE(_PyList_CAST(op)->ob_item)

0 commit comments

Comments
 (0)