-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add __hash__ and __equal__ method to make the CPE class hashable. When being hashable it can be used as keys for dicts or in sets. The __hash__ defines the identity of the CPE instance. Also add a __repr__ method for easier debugging and better representation of a CPE instance.
- Loading branch information
1 parent
f280e08
commit 2201ae8
Showing
2 changed files
with
60 additions
and
3 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