Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e7f516c

Browse files
committed
Issue #19512: _count_elements() of _collections reuses PyId_get identifier
instead of literal "get" string
1 parent d9d0419 commit e7f516c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_collectionsmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ _count_elements(PyObject *self, PyObject *args)
18161816
Py_DECREF(key);
18171817
}
18181818
} else {
1819-
bound_get = PyObject_GetAttrString(mapping, "get");
1819+
bound_get = _PyObject_GetAttrId(mapping, &PyId_get);
18201820
if (bound_get == NULL)
18211821
goto done;
18221822

0 commit comments

Comments
 (0)