datetime and the rich-companison operators

E

Ethan Furman

Greetings All!

I am implementing a NullDate class in order to mirror dates and
datetimes that have no value (yes, this is for my dbf module :)

I'm still a bit fuzzy about class methods, hashing, and __new__, but my
question of the moment is this: it seems to me that with two dates or
datetimes, they should either be equal, or one should precede the other,
and this can be accomplished quite handily with __cmp__... so does
anyone know why the rich comparisons were used in the datetime module?
Was it simply a style choice, or is something being handled that __cmp__
couldn't cope with?

Thanks in advance!
~ethan~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top