Skip to content

Releases: salt-die/mind_the_gaps

Removed `Gap.__invert__()` and made `Var` public.

07 Dec 04:47
Compare
Choose a tag to compare

Gap.__invert__ makes poor assumptions about the bounds of a Gaps generic type. It's better not to make any assumptions and remove this operator. PositiveInfinity and NegativeInfinity are also removed with this change. Gaps can still be inverted "by hand", e.g. my_gaps ^ Gaps([some_smallest_value < x, x < some_largest_value]).

Var is now public. Useful if x is already in your namespace.

Create gaps from strings or from `x`.

28 Nov 11:27
Compare
Choose a tag to compare
Pre-release

Create gaps from a string or from x, e.g.,

>>> from mind_the_gaps import Gaps, x
>>> 0 <= x
Endpoint(value=0, boundary='[')
>>> x < 1
Endpoint(value=1, boundary=')')
>>> print(Gaps([0 <= x, x < 1]))
{[0, 1)}
>>> print(Gaps.from_string("{[0, 1)}"))
{[0, 1)}

Initial alpha release.

26 Nov 10:34
Compare
Choose a tag to compare
Pre-release

Mind the gaps!

Gaps are sets of mutually exclusive sorted intervals that can be union-ed, intersected, xor-ed, or subtract-ed.