On Tue, Dec 8, 2009 at 7:22 PM, Luke Plant <[email protected]> wrote:
...
> However, it could be slightly more efficient in some cases, because
> the entire QuerySet._result_cache does not necessarily need to be
> filled - we can stop if we find a match, saving us the work of
> building Model objects that might not be needed.

You could also inspect the item to see if it's an instance of the
.model; if not, fast path False.

Which leads to a question of edge-case semantics -- "1 in qs" checking
for primary key value.  Good or bad?

--

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