It would be nice if some of the optional DB API
extensions mentioned in PEP 249 could be implemented.
In particular, I'm interested in the one that's
probably the simplest to implement: allowing cursors to
act as iterators. This simply involves adding an
__iter__() method which returns the cursor object
itself, and a next() method which calls fetchone() and
returns the data, or raises StopIteration if the end of
the data has been reached (when fetchone() returns None).
I've already tested this alteration on my installation,
and it seems to work fine. I can provide patches if
required.