> 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/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4