MCPcopy Create free account
hub / github.com/pybind/pybind11 / PyIterable_Check

Function PyIterable_Check

include/pybind11/pytypes.h:1395–1403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1393using dict_iterator = generic_iterator<iterator_policies::dict_readonly>;
1394
1395inline bool PyIterable_Check(PyObject *obj) {
1396 PyObject *iter = PyObject_GetIter(obj);
1397 if (iter) {
1398 Py_DECREF(iter);
1399 return true;
1400 }
1401 PyErr_Clear();
1402 return false;
1403}
1404
1405inline bool PyNone_Check(PyObject *o) { return o == Py_None; }
1406inline bool PyEllipsis_Check(PyObject *o) { return o == Py_Ellipsis; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected