"Backward"-Iterator - Beginners question

patrick vrijlandt patrick.vrijlandt at gmail.com
Fri Nov 1 21:09:02 CET 2013

Chris Angelico <rosuav at gmail.com> wrote:
> On Fri, Nov 1, 2013 at 9:18 PM, Ulrich Goebel <ml at fam-goebel.de> wrote:
>> That gives me the solution. What I have, is an iterator object comming as a
>> SQLite database cursor object. So I could minimize the underliying SELECT
>> and build index = list(cursor). Then with Your hints I get what I want.

Well, if you want to iterate over a SQL result backwards, I would seriously
consider modifying the SELECT to yield the results in the right order. That
would avoid keeping the list in memory and makes best use of the database.


More information about the Python-list mailing list