3 Mar
2002
3 Mar
'02
8:05 p.m.
Would it be good to allow adding/subtracting scalars (int, long, float) to/from date/times? The scalar value would be # of seconds.
So: dt = datetime() # some date/time dt + 5 # would add 5 seconds dt + 5.3 # would add 5 seconds 300000 usecs
Yes, I think so. Timedelta should also support this, I believe. Thanks for the patch! Of course, the test suite needs to be augmented too. BTW, we prefer comments and edits to the Wiki over the mailing list: http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage I've added this already. --Guido van Rossum (home page: http://www.python.org/~guido/)