On 10/11/06, Gábor Farkas <[EMAIL PROTECTED]> wrote:
>
> Russell Keith-Magee wrote:

> sorry, but is this the description of the __iter__ case, or the
> iterator() case?

Now that you mention it.... (looks furiously at code...)

Ok - it doesn't work quite like I thought it did. Here's the rundown
of what actually happens:

iterator() on the Manager (Article.objects.iterator()) is a shortcut
for Article.objects.all().iterator().

__iter__() on the QuerySet returns an iterator over the cached query
results. If the cache isn't filled, a call to iterator() is made to
populate the cache.

iterator() on the QuerySet is the heavy lifting method - it is a
non-cached execution of a query.

The confusion on my end is that I don't think I've ever called
iterator() explicity - I just use the iterator protocol. Sorry if I
lead anyone astray.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to