First/last enforces ordering because of its nature and also we can't break
compatibility. And second factor is that qs[0] as I wrote above can raise
exception and also will still have ordering (from model.meta for example).

вс, 14 апр. 2019 г., 0:04 Florian Apolloner <f.apollo...@gmail.com>:

> On Saturday, April 13, 2019 at 10:58:24 PM UTC+2, alTus wrote:
>>
>> I've posted the source code if `first`. You can see there that if qs is
>> not ordered then ordering by pk is added.
>> It's the main point of this issue btw.
>>
>
> Oh I didn't realize that first enforces ordering. Yet another function is
> not a good idea though I fear. I'd check what the reason for enforcing
> ordering in `.first` are and maybe we can just drop that. qs[0] wouldn't
> enforce ordering either (or does it), so why would first do that…
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-developers/azvOPaEElOY/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/dbe81ba1-ec80-4e78-b63d-a67bfdfae538%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/dbe81ba1-ec80-4e78-b63d-a67bfdfae538%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAJF%3Dk3m8HzDo1t_nC%3D_pq5FnRqmJxu2kZ4jJdHy7wGOyYrPceA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to