Changes between Initial Version and Version 1 of Ticket #29226, comment 5


Ignore:
Timestamp:
Mar 31, 2018, 4:41:16 AM (6 years ago)
Author:
Chris Jerdonek

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29226, comment 5

    initial v1  
    1 Another option could simply be to sort anytime iterating over a dict. I use this practice in personal projects so that behavior will always be deterministic. Also, I personally don't think relying on dict's implicit ordering should be encouraged. It seems too tricky, and there are other patterns whose behavior is more obvious (e.g. the nesting approach).
     1Another option could simply be to change Django's code to sort before iterating over the dict (perhaps only in older versions of Python). I use this practice in personal projects so that behavior will always be deterministic. Also, I personally don't think relying on dict's implicit ordering should be encouraged. It seems too tricky, and there are other patterns whose behavior is more obvious (e.g. the nesting approach).
Back to Top