Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods first_before and first_after. #39

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

progval
Copy link
Contributor

@progval progval commented Mar 8, 2016

No description provided.

@progval
Copy link
Contributor Author

progval commented Mar 6, 2017

ping?

@chaimleib
Copy link
Owner

chaimleib commented May 29, 2018

I like the idea, but I want to allow for a strict option before I merge it, like this:

assert t.first_after(4, strict=false) == Interval(4, 7, '[4,7)')
assert t.first_after(4, strict=true) == Interval(5, 9, '[5,9)')

@chaimleib
Copy link
Owner

I'm also unsure what the best behavior is for if the returned interval could be one of several options with equal nearest bounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants