Message254039
`sum` has an optional `start` parameter, which defaults to 0, and is used as the first item to add. Since timedeltas and ints are not interoperable, that means you have to explicitly tell sum what to use.
The following code works:
>>> e=[datetime.timedelta(3), datetime.timedelta(5)]
>>> sum(e, datetime.timedelta(0))
datetime.timedelta(8)
This is not a bug, but maybe this could use a more descriptive error message? I don't know. |
|
Date |
User |
Action |
Args |
2015-11-04 04:34:27 | abarry | set | recipients:
+ abarry, kevinjqiu |
2015-11-04 04:34:27 | abarry | set | messageid: <1446611667.03.0.404353938924.issue25549@psf.upfronthosting.co.za> |
2015-11-04 04:34:27 | abarry | link | issue25549 messages |
2015-11-04 04:34:26 | abarry | create | |
|