2 ms·
Hm, I don't know, I guess == on datetimes means "is the same instant" to me.
by stavros 4y ago
Hm, I don't know, I guess == on datetimes means "is the same instant" to me.
- rzzzt 4y agoNoone else has to guess (or go and inspect what an overloaded comparison operator actually does) if there is a meaningful name attached to the comparison, like in the parent comment.
- stavros 4y agoSure, but there's also a reason we don't have `x.is_numerically_equal_to(3)`.
- fdupress 4y agoAnd that reason is that there is a canonical definition of what it means for two numbers to be equal. The fact that your intuition of "these two timestamps are equal" is "these two timestamps denotes the same instant" seems problematic when we know that the notions of timestamps and time are not in fact aligned (because, for example, of leap seconds).
- ur-whale 4y agoThat's what it means to you But an API should never get into a place where your personal choices should matter and various incompatible interpretations potentially make sense to different people.