sortedcontainers v1.4.2 Release Notes

Release Date: 2015-10-20 // over 8 years ago
  • API Changes

    • ๐Ÿ”„ Changed SortedList initializer to support key-argument callable and automatically return SortedListWithKey when present.
    • ๐Ÿ”„ Changed SortedListWithKey to inherit from SortedList.
    • Changed SortedSet.__ior__ to call update rather than union.
    • ๐Ÿ”„ Changed SortedList comparison to match Sequence semantics as described in CPython Language Reference Section 5.9.
    • ๐Ÿ”„ Changed SortedSet comparison to raise NotImplemented on type mismatch.
    • Removed SortedList.as_list method. Use list(sorted_list) instead.
    • โœ‚ Removed SortedList._slice method. Use slice.indices instead.
    • โž• Added private references to public methods for internal use to ease method over-loading.

    ๐Ÿ›  Bugfixes

    • ๐Ÿ”„ Changed sorteddict.ValuesView.count to correctly reference sorted dictionary.

    ๐Ÿ‘Œ Improvements

    • SortedList.__getitem__ now 35% faster for indexing at beginning and end.
    • SortedList.pop now 35% faster by inlining fast-paths.
    • del sorted_list[:] now calls clear and is much faster.
    • โšก๏ธ sorted_list[:] = values now calls clear and update and is much faster.

    Miscellaneous

    • โž• Added Python 3.5 support in tox testing.
    • โž• Added discussion of ruamel.ordereddict.sorteddict to performance documentation.
    • ๐Ÿ”€ Merged file sortedlistwithkey.py into sortedlist.py.