From: Scott Gasch Date: Thu, 15 Dec 2022 23:44:46 +0000 (-0800) Subject: More docs. X-Git-Url: https://wannabe.guru.org/gitweb/?a=commitdiff_plain;h=f15b713067678d6c7d68ba64c721986f64931cbc;p=pyutils.git More docs. --- 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