On Tue, Feb 17, 2009 at 2:11 PM, Alex Gaynor <[email protected]> wrote:
...
>
> Neither is completely correct ;).  Both do chunked reads from the
> DB(__iter__ using iterator for getting the data), however __iter__ also
> caches them, so if you reiterate you don't do a second db query, whereas
> iterator doesn't cache them.

If I'm reading it right, it looks like ForNode doesn't use .iterator.
I can see why it might be useful to assume QS cache should be used--
maybe the same QS will be repeatedly iterated.

Even so, it seems like it'd be useful to have a built-in filter which
uses iter(object)?

{% for question in poll.questions.all()|iterate %}
?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to