Skip to content

Add OrderedSet.of constructor and improve docs

Choose a tag to compare

@Techcable Techcable released this 16 Jun 07:33
· 6 commits to master since this release
7fdfb6e

Adds the OrderedSet.of factory method. This is a convenient shorthand for OrderedSet([1,2,3]) while avoiding an extra pair of brackets.

Significantly improve docstrings and readme, although the API documentation is still not published. See PR #4 for ongoing work.

Changes

  • OrderedSet.sort now require key and reverse to be keyword arguments. This is consistent with the (new) behavior of list.sort.
  • This is (potentially) breaking, but the old behavior was never intended
  • Change format of OrderedSet.__repr__ to use the new OrderedSet.of factory method.
  • Configure ruff more agressively, adding lints well beyond the defaults.