Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

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.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41904>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to