comment PartitionedSignal lt/le
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 27 Dec 2020 00:09:57 +0000 (00:09 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 27 Dec 2020 00:09:57 +0000 (00:09 +0000)
src/ieee754/part/partsig.py

index a5f95140d38aeef8a571693328b2721ef0e68f19..728764e77f972d75ba0229f4d5e2e821a059ea78 100644 (file)
@@ -252,6 +252,7 @@ class PartitionedSignal:
 
     def __lt__(self, other):
         width = self.sig.shape()[0]
+        # swap operands, use gt to do lt
         return self._compare(width, other, self, "gt", PartitionedEqGtGe.GT)
 
     def __ge__(self, other):
@@ -260,6 +261,7 @@ class PartitionedSignal:
 
     def __le__(self, other):
         width = self.sig.shape()[0]
+        # swap operands, use ge to do le
         return self._compare(width, other, self, "ge", PartitionedEqGtGe.GE)
 
     # useful operators