Message377771
Even if I agreed that this method "makes no sense", and I don't, removing it would be gratuitous breakage.
Why should we break potentially thousands of people's code who are happily using this method, merely because you say that people who use it have "the wrong semantic mental model"?
Considered as a datetime, having `today` return the date and time *now* makes good sense to me. Obviously the date components must be today's date, not yesterday or tomorrow; and the time component could be any arbitrary time, with the current time an obvious choice.
And since datetime inherits from date, it would be very odd if it didn't inherit the `today` method. It would also violate the Liskov Substitution Principle.
But even if you disagree with my opinions, you still have to justify breaking backwards compatibility. |
|
Date |
User |
Action |
Args |
2020-10-01 16:22:39 | steven.daprano | set | recipients:
+ steven.daprano, yurzo |
2020-10-01 16:22:39 | steven.daprano | set | messageid: <1601569359.78.0.591823205606.issue41904@roundup.psfhosted.org> |
2020-10-01 16:22:39 | steven.daprano | link | issue41904 messages |
2020-10-01 16:22:39 | steven.daprano | create | |
|