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

Interval measure property: Length of an interval with numeric bounds #60

Closed

Conversation

dmitrii-ubskii
Copy link

@dmitrii-ubskii dmitrii-ubskii commented May 19, 2021

This property of Interval is sorely missed when attempting to find e.g. mode over the interval in an IntervalDict.

@AlexandreDecan
Copy link
Owner

Hello,

Thanks for the PR! I'm afraid I won't merge it because it somehow "breaks" the genericity of our Interval since this method is specific to number-based intervals. See #42 for more details.

Notice however that I'm currently considering adding an easy way to ease extending Interval at runtime (i.e., a way to bind new methods dynamically).

@AlexandreDecan AlexandreDecan added enhancement New feature or request wontfix This will not be worked on labels May 19, 2021
@dmitrii-ubskii
Copy link
Author

I'd argue that this change doesn't break generalizability, since the library still behaves the same with non-numeric intervals. This is a simple QoL improvement for a common use-case. In fact, this will provide an obvious customization point for a user-extended Interval.

I don't think requiring users to reimplement this every time is a good approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants