Patches item #1679204, was opened at 2007-03-12 14:58 Message generated for change (Comment added) made by collinwinter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1679204&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Modules Group: Python 2.6 >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Collin Winter (collinwinter) Assigned to: Collin Winter (collinwinter) Summary: Allow "datetime in date" Initial Comment: 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. ---------------------------------------------------------------------- >Comment By: Collin Winter (collinwinter) Date: 2007-03-12 22:12 Message: Logged In: YES user_id=1344176 Originator: YES Closing. Comparing dates and datetimes is just a bad idea. This was more a proof-of-concept than anything else. ---------------------------------------------------------------------- Comment By: Georg Brandl (gbrandl) Date: 2007-03-12 17:46 Message: Logged In: YES user_id=849994 Originator: NO Patch looks good, but the indentation of the /* nb_xyz */ comments seems to be messed up ;) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1679204&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches