list(rows) forcibly consumes the iterator and loads all the data in memory at once, which is also defeating the purpose of having an iterator. If you don't care about query time, getting the count from the db will work. Otherwise, my previous suggestion on how to deal with the trailing comma without len should work - you lose the trailing comma without either reading it all in to memory, or doing an additional query.
On Tue, Jan 10, 2012 at 9:19 AM, Andre Smit <freevryh...@gmail.com> wrote: > Yes this will work but defeats the benefit of iterBetter and yield. > > -- > You received this message because you are subscribed to the Google Groups > "web.py" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/webpy/-/SzTGYLI-0asJ. > > To post to this group, send email to webpy@googlegroups.com. > To unsubscribe from this group, send email to > webpy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/webpy?hl=en. > -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to webpy@googlegroups.com. To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.