1

From Python version 3.6.1, dict() is ordered.

However the devs specifically warn to do not rely on this. Why? I really would like to rely on dictionaries being ordered.

I tested it over and over and I can't find any unexpected behaveior, the keys are always ordered. Am I missing something? Is there any particular case I should be aware of and I should absolutely not rely on the order of keys in dict()?

alec_djinn
  • 10,104
  • 8
  • 46
  • 71

0 Answers0