-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Use introspection rather than calling Interval()
inside methods that return new intervals from inside instances
#58
Comments
Hello, Yes, it makes sense ;-) Actually, that's something I already implemented in a (quite old now) local branch. I've never made it public because I haven't found a proper solution to enable I'll look at this next week. I'll update this issue as soon as something get done ;) |
I have two questions: (1) Would you agree to review the changes related to this issue? If so, I'll create a PR, if not, I'll commit directly to the master branch; Thank you! |
Hello, For (1) Ok, thank you ;) I'll submit a PR soon, and I'll ping you so that you can review these changes ;) For (2) Thanks for these explanations. I've the impression that |
I don't know if you got "ping-ed" by the pull request, but here it is: #59 |
Hi! I hope you're doing well. Can you have a look at #59 please? |
Here is what I mean:
Rather than this:
I think that something like this is preferable:
The reason for my feeling here is that it allows one to subclass your extremely helpful
Interval
class and allows that subclass to return instances of itself when making anor
comparison, for example.Lets say that I have two objects that are subclasses of
Interval
(SpecialInterval
):a
andb
.In your code,
type(a | b)
returnsInterval
.I think most people would expect it to return a
SpecialInterval
object since we were comparing twoSpecialInterval
instances.Does this make sense?
The text was updated successfully, but these errors were encountered: