
On Feb 29, 2020, at 10:03, Steve Jorgensen stevej@stevej.name wrote:
In that case, I still do think that this kind of functionality is of enough general use to have something for it in the Python standard library, though it should probably be through the introduction of a new type (possibly named something like "bounds") since neither range nor slice is really a good fit. I'm thinking it should/would be much more limited in scope than intervaltree (which does look really nice).
There are a ton of different libraries on PyPI for interval/discrete range/range values and sets and algebra and/or arithmetic on them, not to mention related things like saturating values within bounds. They all provide different functionality with different interfaces. Why do we need to pick one (or redesign and reimplement one without even looking for it) in particular?