[Python-ideas] datetime module enhancements
lists at cheimes.de
Mon Mar 12 18:56:56 CET 2007
Steven Bethard schrieb:
>> datetime <= date and datetime => date should raise a TypeError. The
>> result is ambiguous. A date with time is never equal to a date.
> Jim Jewett wrote:
>> As a practical matter, sorting uses <=
> Are you sure?
It depends what tp slot is defined. The C api supports either comparison
(cmp style -1, 0, 1) or rich comparison (func(self, other, operator)).
More information about the Python-ideas