homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author abarry
Recipients abarry, kevinjqiu
Date 2015年11月04日.04:34:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446611667.03.0.404353938924.issue25549@psf.upfronthosting.co.za>
In-reply-to
Content
`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.
History
Date User Action Args
2015年11月04日 04:34:27abarrysetrecipients: + abarry, kevinjqiu
2015年11月04日 04:34:27abarrysetmessageid: <1446611667.03.0.404353938924.issue25549@psf.upfronthosting.co.za>
2015年11月04日 04:34:27abarrylinkissue25549 messages
2015年11月04日 04:34:26abarrycreate

AltStyle によって変換されたページ (->オリジナル) /