[issue41904] datetime.datetime.today makes no sense and should be removed

Damian Yurzola report at bugs.python.org
Thu Oct 1 12:37:28 EDT 2020


Damian Yurzola <damian at yurzola.net> added the comment:

Thanks for your prompt answer Steven.

I was inspired to file this bug after reading through a multiplicity of bugs introduced by folks confused by the library's behavior. So there's good precedent.

While granted, the documentation is explicit and the inheritance chain substantiates it. There's nothing more explicit than the function/type names and saying datetime.today() brings, as you say, arbitrary time to the conversation. Which I claim, subjectively, that it should not.


Gratuitous breakage, is debatable. It would not be the first or last. It could be a chance to remove a lot of code that works around potentially incorrect mental models.

But since both points are to some extent subjective. I'm OK to have left this on the record and move on.


What do you say about the unnecessarily redefined properties?

Lines Lib/datetime.py#L1606 to datetime.py#L1620

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41904>
_______________________________________


More information about the Python-bugs-list mailing list