Idea: More intuitive use of contains
nielstron opened this issue · 1 comments
nielstron commented
The contains
method might be a bit unintuitive for the average user, I.e. in this line
I suggest to add this to interval and use it instead
def is_after(x, y):
# True iff y is after x
return contains(make_from(x, TrueData()), y)
The parameters could also be switched. Still thinking about a clearer/less confusing/confusable name for the relationship
juliusfrost commented
I agree this can be a bit confusing. I think we would need to make clear that the block slot is the interval is after the deadline. I think your snippet achieves that mostly. The lecture goes into why that must be the case but isn't clear from the code. As a result I made a mistake implementing it before watching the lecture. I'll think about this more...