Created
November 4, 2015 04:09
-
-
Save kevinjqiu/9249ed2100bd7d50bfab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
x = [datetime.timedelta(1), datetime.timedelta(2)] | |
print(x[0] + x[1]) # datetime.timedelta(3) | |
print(sum(x)) # TypeError: unsupported operand type(s) for +: 'int' and 'datetime.timedelta' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment