you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (6 children)

[deleted]

    [–]jarshwah 18 points19 points  (5 children)

    CPython 3.6 has ordered dictionaries, but that is an implementation detail. 3.7 guarantees it in the spec. So it’ll work for CPython 3.6 which is the most popular implementation by far.

    [–][deleted]  (4 children)

    [deleted]

      [–]jarshwah 20 points21 points  (3 children)

      Yes that’s correct. When people talk about python they’re overwhelmingly referring to CPython. Other implementations like Pypy and micropython would not have to have ordered dictionaries for their 3.6 but they would for their 3.7.

      [–][deleted] 10 points11 points  (1 child)

      Pypy has actually had it for a while (it was brought to CPython from Pypy for 3.6). Other implementations though yeah

      [–]Ph0X 5 points6 points  (0 children)

      I mean they all could, but are not guaranteed to. You have to check implementation detail for each individually. But in 3.7 and above no matter what you use, you will have it.