Question: It seems odd that Python does not allow you to compare date and datetime objects. Python could have chosen to treat every date object as

It seems odd that Python does not allow you to compare date and datetime objects. Python could have chosen to treat every date object as a datetime object at midnight for comparison purposes just like you did. But Python chose not to do this and instead requires you to do the conversion manually.
Can you think of a reason why Python chose not to support comparison between the two types?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!