[issue39496] Inelegant loops in Modules/_sqlite/cursor.c

Vedran Čačić report at bugs.python.org
Sat Feb 1 00:50:34 EST 2020


Vedran Čačić <vedgar at gmail.com> added the comment:

You mean, something like

    while ((row = pysqlite_cursor_iternext(self))) {
            PyList_Append(list, row);
            Py_DECREF(row);
    }

? It's interesting that now we have walrus in Python, we see the opportunities for it in other languages. (In C, it's spelled (=).:)

----------
nosy: +veky

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39496>
_______________________________________


More information about the Python-bugs-list mailing list