From f15b713067678d6c7d68ba64c721986f64931cbc Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Thu, 15 Dec 2022 15:44:46 -0800 Subject: [PATCH] More docs. --- src/pyutils/collectionz/interval_tree.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pyutils/collectionz/interval_tree.py b/src/pyutils/collectionz/interval_tree.py index d4b33cb..aee8385 100644 --- a/src/pyutils/collectionz/interval_tree.py +++ b/src/pyutils/collectionz/interval_tree.py @@ -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 -- 2.45.2