[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-04 Thread Chris Withers
Chris Withers <[EMAIL PROTECTED]> added the comment: Amaury, Yes, I agree with you, and that sucks too. I'd suggest opening another bug for that ;-) For an allegedly nice, shiny, new and perfect module, datetime sure seems to have an awful lot lacking... Chris

[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: To be valid, your analogy between dates and numbers suggests that a date should be convertible to the datetime with the same date, at midnight. And both objects compare equal, just like 42==42.0 But today this is not the case: it's hard

[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-03 Thread Chris Withers
Chris Withers <[EMAIL PROTECTED]> added the comment: This may be "as documented" but it's *extremely* counter intuitive and seems to go against the grain of where python is headed. (remember that whole struggle to get 3/2 = 1.5 rather 3/2=1? ;-) ) I've changed the "type" to "feature request", w

[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-01 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- resolution: -> invalid status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-01 Thread Tim Peters
Tim Peters <[EMAIL PROTECTED]> added the comment: This isn't "a bug", since it's functioning as documented and designed. Read note 1 in the "date Objects" section of the reference manual, explaining the meaning of "date2 = date1 + timedelta": """ date2 is moved forward in time if timedelta.days

[issue3249] bug adding datetime.timedelta to datetime.date

2008-07-01 Thread Chris Withers
New submission from Chris Withers <[EMAIL PROTECTED]>: The following demonstrates the problem: >>> from datetime import datetime,timedelta >>> datetime.now().date()+timedelta(hours=1) datetime.date(2008, 7, 1) I'd expect the above to either result in a TypeError or (preferably) datetime.datetim