On Tuesday, June 2, 2020 at 11:28:34 AM UTC+2, Adam Johnson wrote:
>
> If you already fetched the queryset, `if obj in queryset` will make a new 
>> database query
>
>
> I don't see why we couldn't implement __contains__ to do a walk through 
> _result_cache if it has been fetched?
>

we are doing the same for len() IIRC. I have to say it sometimes makes it a 
little bit hard to debug, but if it is documented as such it should be okay.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/fa0eae17-2c25-4ae2-befb-c20ebfb8d1da%40googlegroups.com.

Reply via email to