-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve type handling in rich comparisons (#111)
Previously an error was raised when doing equality comparisons between BitMaps and other instance types, which is unexpected in Python. Move over to implementing each of the rich comparison methods directly so that we can more match the usual pattern of allowed (and rejected) comparisons. Also explicitly check for `None` when validating that two BitMaps can be compared, so that the error message emitted in that case is of the more expected type (i.e: `TypeError` rather than `AttributeError`).
- Loading branch information
1 parent
678552b
commit 4890bdb
Showing
2 changed files
with
56 additions
and
15 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