-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Register BTree/Bucket as MutableMapping and Set/TreeSet as MutableSet.
Add tests to verify they implement the required methods. Turns out they didn't, so implement them. This means popitem for the mappings, and pop/discard/isdisjoint plus a swath of operators for the sets. Do this in both C and Python. The implementations are probably on the naive side, in that they work with generic iterators and don't try to do any complex structural merging, but that makes them easier to understand and hopefully be correct. Performance shouldn't be too bad, nothing worse than O(N*logM) (roughly). One method requires extra storage space of O(N), and __xor__ requires storage of O(N*M). Fixes #121
- Loading branch information
Showing
11 changed files
with
1,292 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.