Hello,
On Tue, Sep 17, 2013 at 05:35:30PM +1000, Ben Finney wrote:
> Venkat Addala <[email protected]> writes:
>
> > rows = cur.fetchall()
> > for row in rows:
>
> You never use ‘rows’ for anything else, so you may as well forget it and
> just iterate directly over the return value::
>
> for row in cur.fetchall():
and what if in body of iteration there is another fetchall()? :)
I mean:
for row in cur.fetchall():
do_domething()
cur.execute("SELECT * FROM another_table")
Cheers:
Ervin
--
https://mail.python.org/mailman/listinfo/python-list