Roy Smith <r...@panix.com> writes: > Ben Finney <ben+pyt...@benfinney.id.au> wrote: > > > Makes sense, since ‘datetime’ can do everything ‘date’ can do, and > > is conceptually a subset of the same concept. > > That's reasonable, but given that, it's weird that date(2014, 1, 23) == > datetime(2014, 1, 23) is False. You would think it should be True, in > the same way that 1 + 0j == 1 is True.
Hmm. It does make sense to me that ‘datetime.date(2014, 1, 23) == datetime.datetime(2014, 1, 23)’. I can come up with rationalisations for why it isn't, but they're not satisfactory. I also don't consider it a bug, though. I'm conflicted :-) -- \ “Those who write software only for pay should go hurt some | `\ other field.” —Erik Naggum, in _gnu.misc.discuss_ | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list