3.2. qupulse.comparable¶
This module defines the abstract Comparable class.
-
class
qupulse.comparable.
Comparable
[source]¶ Bases:
object
An object that can be queried for equality with other Comparable objects.
Subclasses must override the abstract property _compare_key which shall provide some object natively equatable in Python (e.g., strings, numbers, tuples containing those, etc..). Comparable provides implementations of the hashing function as well as the equals and not-equals operators based on comparison of this key.