Unnamed
public text v1 · immutabledef iterate_cursor(cursor):
l = cursor.fetchone()
if l:
yield l
#elsewhere:
cursor.execute("SELECT Blah...")
for line in iterate_cursor(cursor):
# do whateverdef iterate_cursor(cursor):
l = cursor.fetchone()
if l:
yield l
#elsewhere:
cursor.execute("SELECT Blah...")
for line in iterate_cursor(cursor):
# do whatever