
March 12, 2007
3:43 p.m.
On 3/12/07, Christian Heimes <lists@cheimes.de> wrote:
datetime before date: < datetime during date: in datetime after date: >
datetime <= date and datetime => date should raise a TypeError. The result is ambiguous. A date with time is never equal to a date.
As a practical matter, sorting uses <= I would be somewhat annoyed if dt < d were True, but when I tried to sort them, dt <= d raised a TypeError. It would be OK with me to raise an error (ValueError?) on "dt <= d" if "dt in d". Others might feel differently, and prefer to always get the TypeError -- which is probably why dt<t doesn't already do the obvious thing. -jJ