gh-49766: Make date-datetime comparison more symmetric and flexible (GH-114760)
Now the special comparison methods like `__eq__` and `__lt__` return NotImplemented if one of comparands is date and other is datetime instead of ignoring the time part and the time zone or forcefully return "not equal" or raise TypeError. It makes comparison of date and datetime subclasses more symmetric and allows to change the default behavior by overriding the special comparison methods in subclasses. It is now the same as if date and datetime was independent classes.
S
Serhiy Storchaka committed
b1043607884d774acabd255ecdcebb159f76a2fb
Parent: d9d6909
Committed by GitHub <noreply@github.com>
on 2/11/2024, 11:06:43 AM