>> you can call .list() on the iter to get a list.
>>
>> result = db.query('....').list()
>
> Does that end up O(n^2) ?
No, it is just O(n).
It is possible to construct a list from any iterator in O(n).
>>> a = iter(range(5))
>>> list(a)
[0, 1, 2, 3, 4]
db.query('...').list() is just a shorthand for list(db.query('...'))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---