Skip to content

OrderedDicts in Python 2

Latest
Compare
Choose a tag to compare
@JamesParrott JamesParrott released this 01 May 19:11
  • dump and dumps now return an OrderedDict, in Pythons before 3.7 or in IronPython which should preserve the order of entries (other than listing the root table entries first). This allowed passing many of the tests, but broke some of them, as OrderedDicts with the same key/val pairs in different orders, are not equal (Python >= 3.7 dicts are). Therefore for all the many users (feel free to get in touch) that started using this fork since I created it, there's a possibility this could be a breaking change, necessitating the second major version bump in a week to v2.
  • integers and floats can have underscores in, in Python 2
  • Passes 312 tests in each of cPythons 2.7, and 3.7 to 3.12, and in Iron Pythons 2.7 and 3.4.