This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alex.henrie
Recipients alex.henrie
Date 2020-01-30.03:18:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580354320.44.0.87062873054.issue39496@roundup.psfhosted.org>
In-reply-to
Content
pysqlite_cursor_fetchall currently has the following bit of code:

    /* just make sure we enter the loop */
    row = (PyObject*)Py_None;

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

This can and should be rewritten as a for loop to avoid the unnecessary initialization to Py_None and the redundant if statement inside the loop.

pysqlite_cursor_fetchmany has the same problem.
History
Date User Action Args
2020-01-30 03:18:40alex.henriesetrecipients: + alex.henrie
2020-01-30 03:18:40alex.henriesetmessageid: <1580354320.44.0.87062873054.issue39496@roundup.psfhosted.org>
2020-01-30 03:18:40alex.henrielinkissue39496 messages
2020-01-30 03:18:40alex.henriecreate