In article <(E-Mail Removed)>,
Ben Finney <(E-Mail Removed)> wrote:
> Skip Montanaro <(E-Mail Removed)> writes:
>
> > [â¦] I was asking [Python] if a datetime instance was an instance of a
> > date. Which, it turns out, it is.
>
> Yep. 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.
Ben Finney <(E-Mail Removed)> wrote:
> Skip Montanaro <(E-Mail Removed)> writes:
>
> > [â¦] I was asking [Python] if a datetime instance was an instance of a
> > date. Which, it turns out, it is.
>
> Yep. 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.
Aucun commentaire:
Enregistrer un commentaire