More docs.
authorScott Gasch <[email protected]>
Thu, 15 Dec 2022 23:44:46 +0000 (15:44 -0800)
committerScott Gasch <[email protected]>
Thu, 15 Dec 2022 23:44:46 +0000 (15:44 -0800)
src/pyutils/collectionz/interval_tree.py

index d4b33cbe62dea02385b1381924429ff2ebb613f7..aee838585b098887e7b3202ca48478453978311e 100644 (file)
@@ -22,6 +22,18 @@ class NumericRange(object):
     helper methods on it."""
 
     def __init__(self, low: Numeric, high: Numeric):
+        """Creates a NumericRange.
+
+        Args:
+            low: the lowest point in the range (inclusive).
+            high: the highest point in the range (inclusive).
+
+        .. warning::
+
+            If low > high this code swaps the parameters and keeps the range
+            rather than raising.
+
+        """
         if low > high:
             temp: Numeric = low
             low = high