➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 Alexander.Belopolsky
收信人 Alexander.Belopolsky, jackdied, jess.austin, ncoghlan
日期 2010-04-21.15:27:34
SpamBayes Score 1.4313711e-10
Marked as misclassified 否
Message-id <1271863656.49.0.358668257819.issue5516@psf.upfronthosting.co.za>
In-reply-to
内容
There is another inconsistency that this patch does not seem to cure.  With patch applied and D and DT defined as in OP,

>>> D(1900,1,1) > DT(1900,1,1)
True

but

>>> DT(1900,1,1) < D(1900,1,1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can't compare DT to D

and

>>> date(1900,1,1) < datetime(1900,1,1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: can't compare datetime.datetime to datetime.date

Note that without the patch,

>>> D(1900,1,1) > DT(1900,1,1)
False

but both behaviors seem to be wrong.
历史
日期 用户 动作 参数
2010-04-21 15:27:36Alexander.Belopolsky修改recipients: + Alexander.Belopolsky, ncoghlan, jackdied, jess.austin
2010-04-21 15:27:36Alexander.Belopolsky修改messageid: <1271863656.49.0.358668257819.issue5516@psf.upfronthosting.co.za>
2010-04-21 15:27:35Alexander.Belopolsky链接issue5516 messages
2010-04-21 15:27:34Alexander.Belopolsky创建