CPython's Iterator Implementation in C
A for loop compiles to PyObject_GetIter plus repeated tp_iternext calls — two C function pointers, no Python-level dispatch for built-in types.
A for loop compiles to PyObject_GetIter plus repeated tp_iternext calls — two C function pointers, no Python-level dispatch for built-in types.