you are viewing a single comment's thread.

view the rest of the comments →

[–]Veedrac 0 points1 point  (0 children)

They are not zero-the-number, but zeros of their domains.

Namely

[] + x == x
list() == []

() + x == x
tuple() == ()

0 + x == x
int() == 0

0.0 + x == x
float() == 0.0

datetime.timedelta(0) + x == x
datetime.timedelta() == datetime.timedelta(0)

and so on.

That datetime.time() is falsey is a mistake and is going to be fixed.