Oddbean new post about | logout
 C implementation:
- cursor_iternext: https://github.com/python/cpython/blob/main/Modules/_sqlite/cursor.c#L1090
- cursor_fetchone_impl: https://github.com/python/cpython/blob/main/Modules/_sqlite/cursor.c#L1142

so yes, fetchone literally just calls next() on the iterator 🤷‍♀️ 

why did they even bother to add it ?!? i don't know, maybe it wasn't always this way, eg from what i remember iterators were much less common in python 2.x times