"Aahz" <aahz at pythoncraft.com> wrote: > > Peter usually gives a good answer, but this time there's a better > answer: With a bug, but if we combine Peter's answer with yours we get an even better answer: def fetch_iter(mydbcursor): while 1: info = mydbcursor.fetchone() if not info: break yield info - Anders