#12110: dictsort is not stable sort
-----------------------------+----------------------------------------------
 Reporter:  eronen           |       Owner:  nobody    
   Status:  new              |   Milestone:            
Component:  Template system  |     Version:  1.1       
 Keywords:  dictsort         |       Stage:  Unreviewed
Has_patch:  1                |  
-----------------------------+----------------------------------------------
 I'm trying to sort a list first by owner, then by date, like this:

 {{{
 {% for item in items|dictsort:"date"|dictsort:"owner" %}
 }}}

 Python's sort method is stable (preserves the order if the sort key is the
 same), so I assumed dictsort would be, too.
 But it's not!

 Ticket #11008 has a patch which fixes this problem, too (although #11008
 is not
 about sort stability as such).

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12110>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to