Metadata-Version: 2.1
Name: deciphon-intervals
Version: 0.1.1
Summary: It helps to model the Python and R intervals seamlessly.
License: MIT
Author: Danilo Horta
Author-email: danilo.horta@pm.me
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pydantic (>=2.6.1,<3.0.0)
Description-Content-Type: text/markdown

# deciphon-intervals

It helps to model the two primary interval definitions in the programming
realm: 0-start, half-open interval (aka Python interval), and 1-start,
fully-closed interval (aka R interval).

## Example

```python
from deciphon_intervals import PyInterval, RInterval, Interval


x = [1, 2, 4, 8]
print(x[PyInterval(start=1, stop=3).slice])
print(x[RInterval(start=2, stop=3).slice])
# [2, 4]
# [2, 4]

interval: Interval = RInterval(start=2, stop=3)

print(interval.py)
print(interval.r)
# PyInterval(start=1, stop=3)
# RInterval(start=2, stop=3)
```

