Issue 1679204: Allow "datetime in date" (original) (raw)

As discussed in http://mail.python.org/pipermail/python-ideas/2007-March/000320.html, this patch adds a contains method to datetime.date objects:

datetime(2007, 3, 4, x, y, z) in date(2007, 3, 4) -> True datetime(2007, 3, 5, x, y, z) in date(2007, 3, 4) -> False

Trying to see if a date contains anything other than a datetime results in a TypeError. Patch includes docs and tests.